AssertingIndexSearcher (Lucene 3.6.2 API)
Keywords: org.apache.lucene.search.AssertingIndexSearcher class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Field Summary

Fields inherited from class org.apache.lucene.search.IndexSearcher
`docStarts, subReaders, subSearchers`

Constructor Summary
`AssertingIndexSearcher(IndexReader r)`
`AssertingIndexSearcher(IndexReader r, ExecutorService ex)`

Method Summary
`Weight` | `createNormalizedWeight(Query query)` Ensures, that the returned `Weight` is not normalized again, which may produce wrong scores.

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`

Methods inherited from class org.apache.lucene.search.Searcher
`createWeight, docFreqs`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### AssertingIndexSearcher

    public AssertingIndexSearcher(IndexReader r)

### AssertingIndexSearcher

    public AssertingIndexSearcher(IndexReader r,
                                  ExecutorService ex)

Method Detail

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD