Sign in Join
Wiki copytemporary

Lazarus InstantSearch: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11## Intro
22
33The instantsearch package is a package to search within sources (or other sources of text)
44
55It provides an as-you-type search mechanism. See the 'View - Instantsearch' menu item (or CTRL-ALT-F).
66
77It uses [Manticore Search](https://manticoresearch.com/) to provide the search capabilities. Manticore search creates an index of the source files, which it then uses to provide you with search capabilities.
88
99## Installation
1010
1111### Install ManticoreSearch
1212
1313Before you can use Lazarus InstantSearch, you must have Manticore Search installed. It can be installed locally, or on another computer.
1414
1515To install Manticore search, please see the instructions at [1](https://manual.manticoresearch.com/Installation)
1616
1717### Install InstantSearch
1818
1919Using the package menu, install the **lazinstantsearch** package. You will need to recompile the IDE.
2020
2121### Configure instantsearch.
2222
2323After installing the package, before you can use instantsearch, it needs to be configured: at least the location of the manticore search engine must be specified.
2424
2525Using Tools - options, select the 'Instant Search' item under the Environment option group.
2626
2727## Configuration
2828
2929The configuration is done using the 'Instant Search' item under the Environment option group.
3030
31-<figure>
32-<img src="lazarus_instantsearch_options1.png" title="Options" />
33-<figcaption>Options</figcaption>
34-</figure>
31+![](/wiki-images/4/46/Lazarus_instantsearch_options1.png)
3532
3633You must configure at least the following things:
3734
3835- Protocol - MySQL or HTTP
3936- MySQL Client version - if you selected the MySQL protocol.
4037
4138You can leave hostname and port empty if you installed on the local machine using the default settings.
4239
4340Test the connection with the 'Test connection' button.
4441
4542If the connection is OK, set the index name to use, and use the 'Create Index' button to create the table used to store the search index.
4643
4744if the index already exists, you will be warned about this.
4845
4946When the index has been created (or was already created), the configuration dialog will check which source trees exist (normally none), and will offer to start indexing. This is done in the background.
5047
5148### Configuring source trees
5249
5350By default, InstantSearch configures 4 source trees:
5451
5552- RTL : The RTL sources of FPC.
5653- FCL : The packages sources of FPC.
5754- Compiler : The FPC compiler sources
5855- LCL : The lazarus LCL sources.
5956
6057You can define as much search trees as you want, using the buttons in the toolbar. You can use the buttons to refresh the indexes of a source tree.
6158
6259Note: when you change the source directory of FPC or rescan it, the RTL/FCL/Compiler trees will be re-indexed.
6360
64-<figure>
65-<img src="lazarus_instantsearch_options2.png" title="Source tree definitions" />
66-<figcaption>Source tree definitions</figcaption>
67-</figure>
61+![](/wiki-images/0/0c/Lazarus_instantsearch_options2.png)
6862
6963The 4 trees are configured and indexed automatically, a message will appear in the messages window when this happens.
7064
7165### Indexing the current (active) project.
7266
7367The sources of the current project can also be searched, provided it has been indexed. This is a 2-step process:
7468
7569- Mark a project as indexable. This can be done using the \`\`Mark project as indexable\`\`
7670
7771
7872popup menu item in the project inspector, or below the 'Project' menu in the main menu.
7973
8074- Actually index the project. The project is automatically indexed when you
8175
8276
8377mark it as indexable.
8478
8579You can manually index a project at any time using the project menu item in the main menu,
8680
8781or the popup item.
8882
8983## Searching
9084
9185To search, open the 'Instant search' window under 'View' (or press CTRL-Alt-F)
9286
9387If Instant Search was not not configured, you will get a warning and the IDE will offer to open the configuration dialog.
9488
9589The dialog will automatically copy the selection (provided it is not too big and does not contain CR/LF characters) to the search edit box and do a search with that.
9690
9791You can type in the search edit box at the top. As you type, the search results will be more refined or expanded.
9892
9993Each match is displayed with the line contents, and the filename+lineno.
10094
101-<figure>
102-<img src="lazarus_instantsearch_searching.png" title="Searching" />
103-<figcaption>Searching</figcaption>
104-</figure>
95+![](/wiki-images/3/36/Lazarus_instantsearch_searching.png)
10596
10697Double click one of the lines to open the file at the selected location.
10798
10899If you have too many matches, you can check or uncheck some of the source trees in the top-right search bar.
109100
110101---
111102*From the Free Pascal wiki, page "Lazarus InstantSearch", as it stood on 2023-04-19 after a change by Skalogryz, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
112103Category: Indexing

Back to history