
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.
FieldQuery(Query)
Initialises a new FieldQuery by flattening the supplied query tree.
Fields
All fields referenced by the query.
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).
GetTerms(string)
All distinct terms that appear in any clause for the given field.
HasField(string)
Whether this field has any query clauses.