[r23428]: plugins / LucenePlugin / trunk / docs / LucenePlugin.html Maximize Restore History

Download this file

LucenePlugin.html    151 lines (147 with data), 5.3 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<html>
<head>
<title>LucenePlugin</title>
</head>
<body>
<h1> LucenePlugin </h1>
<p>
Written by: Matthieu Casanova, Shlomy Reinstein.
</p>
<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>
<p>
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>.
</p>
<p>
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.
</p>
<p>
<a name="CreateIndex">
<h3> Creating an index: </h3>
</a>
<ol>
<li>
Select the files to index.
<ul>
<li>
To create an index for a project, right-click the project in the ProjectViewer
dockable window, and select "Index in Lucene".
<li>
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".
</ul>
<li>
The "New Lucene Index" dialog will show up. Fill-in the details.
<ol>
<li>
If this is not a project index, specify the index name.
<li>
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:
<ul>
<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" ...).
</ul>
For more information, check the
<a href="http://lucene.apache.org/java/3_0_2/api/core/org/apache/lucene/analysis/Analyzer.html">
Analyzer documentation
</a>, or more briefly
<a href="http://www.javabeat.net/articles/332-using-the-built-in-analyzers-in-lucene-1.html">
Using the Built-in Analyzers in Lucene
</a>.
</ol>
<li>
Click Ok to start creating the index.
</ol>
</p>
<p>
<a name="SearchIndex">
<h3> Searching an index: </h3>
</a>
<ol>
<li>
Open the "Search with Lucene" dockable window using <tt>Plugins -&gt; LucenePlugin -&gt;
Lucene Search </tt>.
<li>
Select the index to search in the combo-box on the right of the dockable.
</li>
<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>
</ol>
<p>
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>
<p> The right-most button toggles the display of additional options, documented below. </p>
<ol>
<li>
If you'd like to constrain the search to a specific file extension, enter the
extension in the 'file type:' box.
</li>
<li>
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.
</li>
<li>
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>
</ol>
<p>
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.
</p>
<a name="DeleteIndex">
<h3> Deleting an index: </h3>
</a>
Select Plugins -> Lucene -> Delete an index, then select the index you'd like to
delete.
<h2>History</h2>
<ul>
<li>4.1 (Mar 06, 2014)</li>
<ul>
<li>Hide exceptions when a non existing file is added to the index</li>
</ul>
</ul>
<a name="Support">
<h3> Support </h3>
</a>
<ul>
<li>
To report bugs, use the
<a href="https://sourceforge.net/tracker/?group_id=588&atid=565475">
Plugins Bugs tracker </a>. Specify the plugin name in the Summary field.
<li>
To ask for new features, use the
<a href="https://sourceforge.net/tracker/?group_id=588&atid=997936">
Plugin Feature Requests tracker </a>. Specify the plugin name in the Summary
field.
</ul>
</body>
</html>