Table of Contents

Class ExamineMultiFieldQueryParser

Namespace
Examine.Lucene.Search
Assembly
Examine.Lucene.dll

Custom query parser to deal with Examine/Lucene field value types

public class ExamineMultiFieldQueryParser : CustomMultiFieldQueryParser, ICommonQueryParserConfiguration
Inheritance
QueryBuilder
QueryParserBase
QueryParser
MultiFieldQueryParser
ExamineMultiFieldQueryParser
Implements
ICommonQueryParserConfiguration
Inherited Members
MultiFieldQueryParser.m_fields
MultiFieldQueryParser.m_boosts
QueryParser.Conjunction()
QueryParser.Modifiers()
QueryParser.ReInit(ICharStream)
QueryParser.ReInit(QueryParserTokenManager)
QueryParser.GetNextToken()
QueryParser.GenerateParseException()
QueryParser.Enable_tracing()
QueryParser.Disable_tracing()
QueryParser.TokenSource
QueryParser.Token
QueryParser.Jj_nt
QueryParserBase.CONJ_NONE
QueryParserBase.CONJ_AND
QueryParserBase.CONJ_OR
QueryParserBase.MOD_NONE
QueryParserBase.MOD_NOT
QueryParserBase.MOD_REQ
QueryParserBase.AND_OPERATOR
QueryParserBase.OR_OPERATOR
QueryParserBase.m_field
QueryParserBase.SetDateResolution(DateResolution)
QueryParserBase.NewBooleanClause(Query, Occur)
QueryParserBase.NewPrefixQuery(Term)
QueryParserBase.NewRegexpQuery(Term)
QueryParserBase.NewMatchAllDocsQuery()
QueryParserBase.NewWildcardQuery(Term)
QueryParserBase.Field
QueryParserBase.AutoGeneratePhraseQueries
QueryParserBase.FuzzyMinSim
QueryParserBase.FuzzyPrefixLength
QueryParserBase.PhraseSlop
QueryParserBase.AllowLeadingWildcard
QueryParserBase.DefaultOperator
QueryParserBase.LowercaseExpandedTerms
QueryParserBase.MultiTermRewriteMethod
QueryParserBase.Locale
QueryParserBase.TimeZone
QueryParserBase.AnalyzeRangeTerms
QueryBuilder.NewTermQuery(Term)
QueryBuilder.NewPhraseQuery()
QueryBuilder.NewMultiPhraseQuery()
QueryBuilder.Analyzer
QueryBuilder.EnablePositionIncrements

Constructors

ExamineMultiFieldQueryParser(ISearchContext, LuceneVersion, Analyzer)

public ExamineMultiFieldQueryParser(ISearchContext searchContext, LuceneVersion matchVersion, Analyzer analyzer)

Parameters

searchContext ISearchContext
matchVersion LuceneVersion
analyzer Analyzer

Methods

GetRangeQuery(string, string, string, bool, bool)

Override to provide support for numerical range query parsing

protected override Query GetRangeQuery(string field, string part1, string part2, bool startInclusive, bool endInclusive)

Parameters

field string
part1 string
part2 string
startInclusive bool
endInclusive bool

Returns

Query

Remarks

By Default the lucene query parser only deals with strings and the result is a TermRangeQuery, however for numerics it needs to be a NumericRangeQuery. We can override this method to provide that behavior.

In previous releases people were complaining that this wouldn't work and this is why. The answer came from here https://stackoverflow.com/questions/5026185/how-do-i-make-the-queryparser-in-lucene-handle-numeric-ranges