public class LuceneIndexSearcher extends IndexSearcher
Constructor and Description |
---|
LuceneIndexSearcher(Directory directory)
Creates a searcher searching the index in the provided directory.
|
LuceneIndexSearcher(IndexReader r)
Creates a searcher searching the provided index.
|
LuceneIndexSearcher(String path)
Creates a searcher searching the index in the named directory.
|
Modifier and Type | Method and Description |
---|---|
TopDocs |
search(Query query,
Filter filter,
int nDocs)
Searches through the lucene index and returns an instance of TopDocs.
|
close, doc, docFreq, explain, getFirstTermPositions, initializeTermPositions, maxDoc, rewrite, search, search, setFirstTermPositions
getSimilarity, search, search, search, search, search, setSimilarity
public LuceneIndexSearcher(String path) throws IOException
IOException
public LuceneIndexSearcher(Directory directory) throws IOException
IOException
public LuceneIndexSearcher(IndexReader r)
public TopDocs search(Query query, Filter filter, int nDocs) throws IOException
search
in interface Searchable
search
in class IndexSearcher
IOException
Copyright © 2024 GATE. All rights reserved.