## Uses of Class
org.apache.lucene.search.TopDocs

Packages that use TopDocs
Package | Description
--- | ---
org.apache.lucene.search | Code to search indices.

### Uses of TopDocs in org.apache.lucene.search

Subclasses of TopDocs in org.apache.lucene.search
Modifier and Type | Class and Description
--- | ---
`class` | `TopFieldDocs` Represents hits returned by `IndexSearcher.search(Query,Filter,int,Sort)`.

Fields in org.apache.lucene.search declared as TopDocs
Modifier and Type | Field and Description
--- | ---
`protected static TopDocs` | TopDocsCollector.`EMPTY_TOPDOCS` This is used in case topDocs() is called with illegal parameters, or there simply aren't (enough) results.

Methods in org.apache.lucene.search that return TopDocs
Modifier and Type | Method and Description
--- | ---
`static TopDocs` | TopDocs.`merge(Sort sort, int topN, TopDocs[] shardHits)` Returns a new TopDocs, containing topN results across the provided TopDocs, sorting by the specified `Sort`.
`protected TopDocs` | TopScoreDocCollector.`newTopDocs(ScoreDoc[] results, int start)`
`protected TopDocs` | TopFieldCollector.`newTopDocs(ScoreDoc[] results, int start)`
`protected TopDocs` | TopDocsCollector.`newTopDocs(ScoreDoc[] results, int start)` Returns a `TopDocs` instance containing the given results.
`protected TopDocs` | IndexSearcher.`search(List<AtomicReaderContext> leaves, Weight weight, ScoreDoc after, int nDocs)` Expert: Low-level search implementation.
`TopDocs` | IndexSearcher.`search(Query query, Filter filter, int n)` Finds the top `n` hits for `query`, applying `filter` if non-null.
`TopDocs` | IndexSearcher.`search(Query query, int n)` Finds the top `n` hits for `query`.
`protected TopDocs` | IndexSearcher.`search(Weight weight, ScoreDoc after, int nDocs)` Expert: Low-level search implementation.
`TopDocs` | IndexSearcher.`searchAfter(ScoreDoc after, Query query, Filter filter, int n)` Finds the top `n` hits for `query`, applying `filter` if non-null, where all results are after a previous result (`after`).
`TopDocs` | IndexSearcher.`searchAfter(ScoreDoc after, Query query, Filter filter, int n, Sort sort)` Finds the top `n` hits for `query`, applying `filter` if non-null, where all results are after a previous result (`after`).
`TopDocs` | IndexSearcher.`searchAfter(ScoreDoc after, Query query, Filter filter, int n, Sort sort, boolean doDocScores, boolean doMaxScore)` Finds the top `n` hits for `query` where all results are after a previous result (`after`), allowing control over whether hit scores and max score should be computed.
`TopDocs` | IndexSearcher.`searchAfter(ScoreDoc after, Query query, int n)` Finds the top `n` hits for `query` where all results are after a previous result (`after`).
`TopDocs` | IndexSearcher.`searchAfter(ScoreDoc after, Query query, int n, Sort sort)` Finds the top `n` hits for `query` where all results are after a previous result (`after`).
`TopDocs` | TopDocsCollector.`topDocs()` Returns the top docs that were collected by this collector.
`TopDocs` | TopDocsCollector.`topDocs(int start)` Returns the documents in the rage [start ..
`TopDocs` | TopDocsCollector.`topDocs(int start, int howMany)` Returns the documents in the rage [start ..

Methods in org.apache.lucene.search with parameters of type TopDocs
Modifier and Type | Method and Description
--- | ---
`static TopDocs` | TopDocs.`merge(Sort sort, int topN, TopDocs[] shardHits)` Returns a new TopDocs, containing topN results across the provided TopDocs, sorting by the specified `Sort`.