Section navigation

Public class QueryParser

Namespace
Rowles.LeanCorpus.Search.Parsing
Assembly
Rowles.LeanCorpus.dll

Parses a query string into a Query object tree. Supports: term, field:term, "phrase", +required, -excluded, (grouping), explicit boolean operators, ranges, regular expressions, field existence, prefix*, wild?card, fuzzy~N, "phrase"~N, boosts, and constant scores.

public class QueryParser
Inheritance
QueryParser
Derived

Public constructor QueryParser(string, IAnalyser, bool, int)

Initialises a new QueryParser with the given default field and analyser.

Public property Analyser

Gets the analyser used to build query terms.

Public method AnalyseMultiTerm(string)

Normalises a wildcard or prefix term while preserving its operators.

Public method AnalyseRangeBound(string)

Normalises one bounded term in a text range query.

Public method AnalyseTerm(string)

Analyses one literal query term.

Public method BuildPhraseQuery(string, string, int)

Builds a phrase query from analysed phrase text.

Public method Parse(string)

Parses the query string into a Query object tree.