Section navigation

Public classSealed FieldQuery

Namespace
Rowles.LeanCorpus.Search.Highlighting
Assembly
Rowles.LeanCorpus.dll

Flattens a Query tree into a per-field map of (term to weighted phrase positions) for use by TermVectorHighlighter.

public sealed class FieldQuery
Inheritance
FieldQuery

Remarks

Construct once per query then query per field. Phrase slop is ignored during flattening (it is validated at highlight time); only the relative positions are recorded.

Public constructor FieldQuery(Query)

Initialises a new FieldQuery by flattening the supplied query tree.

Public property Fields

All fields referenced by the query.

Public method GetPhrasePositions(string, string)

For a phrase clause, the relative positions the term must occupy. Returns null if the term appears only in non-phrase clauses (any position matches).

Public method GetTerms(string)

All distinct terms that appear in any clause for the given field.

Public method HasField(string)

Whether this field has any query clauses.