|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectanl.aida.client.search.LuceneSearcher
public class LuceneSearcher
Searches a Lucene index and returning results as DocumentIDs.
Field Summary | |
---|---|
private org.apache.lucene.search.IndexSearcher |
searcher
|
private anl.aida.core.ScoredTermsCollection |
stc
|
Constructor Summary | |
---|---|
LuceneSearcher(java.lang.String index,
anl.aida.core.ScoredTermsCollection stc)
|
Method Summary | |
---|---|
void |
close()
Closes the searcher. |
private anl.aida.core.DocumentID |
findDocument(java.lang.String path)
|
java.util.List<anl.aida.core.DocumentID> |
search(java.util.List<anl.aida.core.DocumentID> ids,
java.lang.String queryString,
int numDocs)
Searches the index using the specified query, returning no more than numDocs results. |
java.util.List<anl.aida.core.DocumentID> |
search(java.lang.String queryString,
int numDocs)
Searches the index using the specified query, returning no more than numDocs results. |
java.util.List<anl.aida.core.DocumentID> |
search(java.lang.String queryString,
int numDocs,
org.apache.lucene.search.Filter filter)
Searches the index using the specified query, returning no more than numDocs results. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private anl.aida.core.ScoredTermsCollection stc
private org.apache.lucene.search.IndexSearcher searcher
Constructor Detail |
---|
public LuceneSearcher(java.lang.String index, anl.aida.core.ScoredTermsCollection stc) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public java.util.List<anl.aida.core.DocumentID> search(java.util.List<anl.aida.core.DocumentID> ids, java.lang.String queryString, int numDocs) throws org.apache.lucene.queryParser.ParseException, java.io.IOException
ids
- any result must be part of this list of document idsqueryString
- the querynumDocs
- the maximum number of docs to return
org.apache.lucene.queryParser.ParseException
- if there is an error in the query
java.io.IOException
- if there is an error searching the indexpublic java.util.List<anl.aida.core.DocumentID> search(java.lang.String queryString, int numDocs) throws org.apache.lucene.queryParser.ParseException, java.io.IOException
queryString
- the querynumDocs
- the maximum number of docs to return
org.apache.lucene.queryParser.ParseException
- if there is an error in the query
java.io.IOException
- if there is an error searching the indexpublic java.util.List<anl.aida.core.DocumentID> search(java.lang.String queryString, int numDocs, org.apache.lucene.search.Filter filter) throws org.apache.lucene.queryParser.ParseException, java.io.IOException
queryString
- the querynumDocs
- the maximum number of docs to returnfilter
- the filter to filter query results. This can be null.
org.apache.lucene.queryParser.ParseException
- if there is an error in the query
java.io.IOException
- if there is an error searching the indexpublic void close() throws java.io.IOException
java.io.IOException
- if there is an error closing the searcher.private anl.aida.core.DocumentID findDocument(java.lang.String path)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |