|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.ontopia.infoset.fulltext.impl.lucene.LuceneSearcher
public class LuceneSearcher
INTERNAL: The Lucene search engine implementation. This searcher searches documents using the Lucene search engine.
| Field Summary | |
|---|---|
protected org.apache.lucene.analysis.Analyzer |
analyzer
|
protected String |
default_field
|
protected String |
path
|
protected org.apache.lucene.search.Searcher |
searcher
|
| Constructor Summary | |
|---|---|
LuceneSearcher(org.apache.lucene.store.Directory dir)
INTERNAL: Creates a searcher that will search a lucene index stored in the given lucene directory. |
|
LuceneSearcher(org.apache.lucene.store.Directory dir,
org.apache.lucene.analysis.Analyzer analyzer)
INTERNAL: Creates a searcher that will search a lucene index stored in the given lucene directory. |
|
LuceneSearcher(String path)
INTERNAL: Creates a searcher that will search a lucene index stored at the given file system path location. |
|
LuceneSearcher(String path,
org.apache.lucene.analysis.Analyzer analyzer)
INTERNAL: Creates a searcher that will search a lucene index stored at the given path location. |
|
| Method Summary | |
|---|---|
void |
close()
INTERNAL: Releases resources associated with this searcher. |
String |
getDefaultField()
INTERNAL: Returns the default field that lucene uses when searching. |
String |
getPath()
INTERNAL: Returns the file system path where the index used is stored. |
static void |
main(String[] argv)
INTERNAL: Command line version of the searcher. |
SearchResultIF |
search(String query)
INTERNAL: Performs a query on an index. |
void |
setDefaultField(String default_field)
INTERNAL: Sets the default field that lucene is to use when searching. |
protected static void |
usage()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String path
protected org.apache.lucene.analysis.Analyzer analyzer
protected org.apache.lucene.search.Searcher searcher
protected String default_field
| Constructor Detail |
|---|
public LuceneSearcher(String path)
throws IOException
path - The file system directory in which the index is located.
IOException
public LuceneSearcher(String path,
org.apache.lucene.analysis.Analyzer analyzer)
throws IOException
path - The file system directory in which the index is located.analyzer - The token stream analyzer that the searcer is to use.
IOException
public LuceneSearcher(org.apache.lucene.store.Directory dir)
throws IOException
dir - The lucene directory where the index is located.
IOException
public LuceneSearcher(org.apache.lucene.store.Directory dir,
org.apache.lucene.analysis.Analyzer analyzer)
throws IOException
dir - The lucene directory where the index is located.analyzer - The token stream analyzer that the searcer is to use.
IOException| Method Detail |
|---|
public String getPath()
public String getDefaultField()
public void setDefaultField(String default_field)
public SearchResultIF search(String query)
throws IOException
SearcherIF
search in interface SearcherIFIOException
public void close()
throws IOException
SearcherIF
close in interface SearcherIFIOExceptionpublic static void main(String[] argv)
protected static void usage()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||