Class FieldCacheTermsFilter
A Filter that only accepts documents whose single term value in the specified field is contained in the provided set of allowed terms.
This is the same functionality as TermsFilter (from contrib/queries), except this filter requires that the field contains only a single term for all documents. Because of drastically different implementations, they also have different performance characteristics, as described below.
The first invocation of this filter on a given field will
be slower, since a String
With each search, this filter translates the specified
set of Terms into a private Lucene.
In contrast, TermsFilter builds up an Lucene.
Generally, this filter will be slower on the first invocation for a given field, but subsequent invocations, even if you change the allowed set of Terms, should be faster than TermsFilter, especially as the number of Terms being matched increases. If you are matching only a very small number of terms, and those terms in turn match a very small number of documents, TermsFilter may perform faster.
Which filter is best is very application dependent.
Namespace:
Assembly: Lucene.Net.NetCore.dll
Syntax
public class FieldCacheTermsFilter : Filter
Constructors
Name | Description |
---|---|
Field |
Properties
Name | Description |
---|---|
Field |
Methods
Name | Description |
---|---|
Get |