Method Search
Search(Weight, Filter, Collector)
Lower-level search API.
Collect(Int32) is called for every document.
Collector-based access to remote indexes is discouraged.
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.
Declaration
void Search(Weight weight, Filter filter, Collector collector)
Parameters
Type | Name | Description |
---|---|---|
Weight | weight | to match documents |
Filter | filter | if non-null, used to permit documents to be collected. |
Collector | collector | to receive hits |
Search(Weight, Filter, Int32)
Expert: Low-level search implementation. Finds the top n
hits for query
, applying filter
if non-null.
Applications should usually call Search(Query, Int32) or Search(Query, Filter, Int32) instead.
Declaration
TopDocs Search(Weight weight, Filter filter, int n)
Parameters
Type | Name | Description |
---|---|---|
Weight | weight | |
Filter | filter | |
System.Int32 | n |
Returns
Type | Description |
---|---|
TopDocs |
Search(Weight, Filter, Int32, Sort)
Expert: Low-level search implementation with arbitrary sorting. Finds
the top n
hits for query
, applying
filter
if non-null, and sorting the hits by the criteria in
sort
.
Applications should usually call Search(Query, Filter, Int32, Sort) instead.
Declaration
TopFieldDocs Search(Weight weight, Filter filter, int n, Sort sort)
Parameters
Type | Name | Description |
---|---|---|
Weight | weight | |
Filter | filter | |
System.Int32 | n | |
Sort | sort |
Returns
Type | Description |
---|---|
TopFieldDocs |