Method Search
Search(Weight, Filter, Int32)
A search implementation which executes each Searchable in its own thread and waits for each search to complete and merge the results back together.
Declaration
public override TopDocs Search(Weight weight, Filter filter, int nDocs)
Parameters
Type | Name | Description |
---|---|---|
Weight | weight | |
Filter | filter | |
System.Int32 | nDocs |
Returns
Type | Description |
---|---|
TopDocs |
Overrides
Search(Weight, Filter, Int32, Sort)
A search implementation allowing sorting which spans a new thread for each Searchable, waits for each search to complete and merges the results back together.
Declaration
public override TopFieldDocs Search(Weight weight, Filter filter, int nDocs, Sort sort)
Parameters
Type | Name | Description |
---|---|---|
Weight | weight | |
Filter | filter | |
System.Int32 | nDocs | |
Sort | sort |
Returns
Type | Description |
---|---|
TopFieldDocs |
Overrides
Search(Weight, Filter, Collector)
Lower-level search API.
Collect(Int32) is called for every matching document.
Applications should only use this if they need all of the matching documents. The high-level search API (Search(Query, Int32)) is usually more efficient, as it skips non-high-scoring hits.
This method cannot be parallelized, because Collector supports no concurrent access.
Declaration
public override void Search(Weight weight, Filter filter, Collector collector)
Parameters
Type | Name | Description |
---|---|---|
Weight | weight | to match documents |
Filter | filter | if non-null, a bitset used to eliminate some documents |
Collector | collector | to receive hits TODO: parallelize this one too |