|
||||||||||
| 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 java.lang.String |
default_field
|
protected java.lang.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(java.lang.String path)
INTERNAL: Creates a searcher that will search a lucene index stored at the given file system path location. |
|
LuceneSearcher(java.lang.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. |
java.lang.String |
getDefaultField()
INTERNAL: Returns the default field that lucene uses when searching. |
java.lang.String |
getPath()
INTERNAL: Returns the file system path where the index used is stored. |
static void |
main(java.lang.String[] argv)
INTERNAL: Command line version of the searcher. |
SearchResultIF |
search(java.lang.String query)
INTERNAL: Performs a query on an index. |
void |
setDefaultField(java.lang.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 java.lang.String path
protected org.apache.lucene.analysis.Analyzer analyzer
protected org.apache.lucene.search.Searcher searcher
protected java.lang.String default_field
| Constructor Detail |
|---|
public LuceneSearcher(java.lang.String path)
throws java.io.IOException
path - The file system directory in which the index is located.
java.io.IOException
public LuceneSearcher(java.lang.String path,
org.apache.lucene.analysis.Analyzer analyzer)
throws java.io.IOException
path - The file system directory in which the index is located.analyzer - The token stream analyzer that the searcer is to use.
java.io.IOException
public LuceneSearcher(org.apache.lucene.store.Directory dir)
throws java.io.IOException
dir - The lucene directory where the index is located.
java.io.IOException
public LuceneSearcher(org.apache.lucene.store.Directory dir,
org.apache.lucene.analysis.Analyzer analyzer)
throws java.io.IOException
dir - The lucene directory where the index is located.analyzer - The token stream analyzer that the searcer is to use.
java.io.IOException| Method Detail |
|---|
public java.lang.String getPath()
public java.lang.String getDefaultField()
public void setDefaultField(java.lang.String default_field)
public SearchResultIF search(java.lang.String query)
throws java.io.IOException
SearcherIF
search in interface SearcherIFjava.io.IOException
public void close()
throws java.io.IOException
SearcherIF
close in interface SearcherIFjava.io.IOExceptionpublic static void main(java.lang.String[] argv)
protected static void usage()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||