org.apache.lucene.search
Class AssertingIndexSearcher
java.lang.Object
org.apache.lucene.search.Searcher
org.apache.lucene.search.IndexSearcher
org.apache.lucene.search.AssertingIndexSearcher
- All Implemented Interfaces:
- Closeable, Searchable
public class AssertingIndexSearcher
- extends IndexSearcher
Helper class that adds some extra checks to ensure correct
usage of IndexSearcher
and Weight
.
TODO: Extend this by more checks, that's just a start.
Methods inherited from class org.apache.lucene.search.IndexSearcher |
close, doc, doc, docFreq, explain, explain, gatherSubReaders, getIndexReader, getSimilarity, getSubReaders, maxDoc, rewrite, search, search, search, search, search, search, search, search, search, search, search, searchAfter, searchAfter, setDefaultFieldSortScoring, setSimilarity, toString |
AssertingIndexSearcher
public AssertingIndexSearcher(IndexReader r)
AssertingIndexSearcher
public AssertingIndexSearcher(IndexReader r,
ExecutorService ex)
createNormalizedWeight
public Weight createNormalizedWeight(Query query)
throws IOException
- Ensures, that the returned
Weight
is not normalized again, which may produce wrong scores.
- Overrides:
createNormalizedWeight
in class IndexSearcher
- Throws:
IOException