<h1> LucenePlugin </h1>
Written by: Matthieu Casanova, Shlomy Reinstein.
<a href="#CreateIndex"> Creating an index </a><br>
<a href="#SearchIndex"> Searching an index </a><br>
<a href="#DeleteIndex"> Deleting an index </a><br>
<a href="#Support"> Support </a><br>
LucenePlugin allows you to perform quick and complex text searches using the
Lucene search engine. It can save you a lot of time when searching across
projects, directory trees or large files. It builds up an index for the text
in the files, and enables you to search this index efficiently.
Information about Lucene is available on the
<a href="http://lucene.apache.org/java/docs">Lucene website</a>.
The plugin allows you to create a Lucene index, using one of the built-in
analyzers, and then search the index. Once created, the index remains updated
when the files in it are changed inside jEdit (i.e. when their buffers are
saved). If the files in the index are changed externally (e.g. by updating them
from a version control system), you can ask the plugin to update the index.
<h3> Creating an index: </h3>
Select the files to index.
To create an index for a project, right-click the project in the ProjectViewer
dockable window, and select "Index in Lucene".
To create an index for a directory tree, right-click the root of the directory
tree in the File System Browser dockable window, and select Plugins ->
LucenePlugin -> Add selected file(s) to a new index.<br>
You can later add more files / directories to an existing index by selecting
"Add selected file(s) to an existing index".
The "New Lucene Index" dialog will show up. Fill-in the details.
If this is not a project index, specify the index name.
Select the analyzer to use for indexing. If you are not familiar with analyzers,
use "Java identifier" for source code, which allows you to look for precise
identifier occurrences, and "Standard" for text, or check the Lucene website for
information about the other analyzers. A brief description of the analyzers:
<li>Standard: Most suitable for free text - uses a sophisticated grammar
to extract words, removes stop words and lowercases.
<li>Keyword: Treats entire text as a single token.
<li>Simple: Divides text at nonletter characters and lowercases.
<li>Java identifier: Suitable for source code - extracts identifier
names from the text and stores them without change.
<li>Whitespace: Splits tokens at whitespace.
<li>Stop: Divides text at nonletter characters, lowercases, and removes
stop words ("a", "an", "are" ...).
For more information, check the
</a>, or more briefly
Using the Built-in Analyzers in Lucene
Click Ok to start creating the index.
<h3> Searching an index: </h3>
Open the "Search with Lucene" dockable window using <tt>Plugins -> LucenePlugin ->
Lucene Search </tt>.
Select the index to search in the combo-box on the right of the dockable.
<li>Finally, enter the words to search for in the "Search for:" box. For those
familiar with Lucene, this can be any Lucene query, not just words.
Click [Enter] to perform the search. </li>
One of the buttons on the right of the dockable toggles between multiple results and a single-result, much like the "Hypersearch Results" dockable of jEdit. The
button to its left clears all previous results that are currently shown.
<p> The right-most button toggles the display of additional options, documented below. </p>
If you'd like to constrain the search to a specific file extension, enter the
extension in the 'file type:' box.
If you'd like to see the line numbers where the search matches, select the
'Line-based results' check-box. The files that match will be re-scanned to
find the line numbers.
Specify the maximal number of results that you want to get for your search in
the "Max results:" box. </li>
<li> There are additional checkbox options to ignore comments or literals. </li>
While an index is being created or updated, the word "Indexing" will show on
the right of the dockable when that index is selected for searching, so you
know that the index is not yet complete.
<h3> Deleting an index: </h3>
Select Plugins -> Lucene -> Delete an index, then select the index you'd like to
<li>4.1 (Mar 06, 2014)</li>
<li>Hide exceptions when a non existing file is added to the index</li>
<h3> Support </h3>
To report bugs, use the
Plugins Bugs tracker </a>. Specify the plugin name in the Summary field.
To ask for new features, use the
Plugin Feature Requests tracker </a>. Specify the plugin name in the Summary