C# (CSharp) Lucene.Net.Queries Namespace

Nested Namespaces

Lucene.Net.Queries.Function
Lucene.Net.Queries.Mlt

Сlasses

Name Description
CommonTermsQuery A query that executes high-frequency terms in a optional sub-query to prevent slow queries due to "common" terms like stopwords. This query builds 2 queries off the #add(Term) added terms: low-frequency terms are added to a required boolean clause and high-frequency terms are added to an optional boolean clause. The optional clause is only executed if the required "low-frequency" clause matches. Scores produced by this query will be slightly different than plain BooleanQuery scorer mainly due to differences in the Similarity#coord(int,int) number of leaf queries in the required boolean clause. In most cases, high-frequency terms are unlikely to significantly contribute to the document score unless at least one of the low-frequency terms are matched. This query can improve query execution times significantly if applicable.

CommonTermsQuery has several advantages over stopword filtering at index or query time since a term can be "classified" based on the actual document frequency in the index and can prevent slow queries even across domains without specialized stopword files.

Note: if the query only contains high-frequency terms the query is rewritten into a plain conjunction query ie. all high-frequency terms need to match in order to match a document.

FilterClause A Filter that wrapped with an indication of how that filter is used when composed with another filter. (Follows the boolean logic in BooleanClause for composition of queries.)
TermFilter A filter that includes documents that match with a specific term.
TermFilter.DocIdSetAnonymousInnerClassHelper
TermsFilter Constructs a filter for docs matching any of the terms added to this class. Unlike a RangeFilter this can be used for filtering on multiple terms that are not necessarily in a sequence. An example might be a collection of primary keys from a database query result or perhaps a choice of "category" labels picked by the end user. As a filter, this is much faster than the equivalent query (a BooleanQuery with many "should" TermQueries)
TermsFilter.FieldAndTermEnum
TermsFilter.FieldAndTermEnumAnonymousInnerClassHelper
TermsFilter.FieldAndTermEnumAnonymousInnerClassHelper2
TermsFilter.TermsAndField