Interface ICommonQueryParserConfiguration
Configuration options common across queryparser implementations.
Namespace: Lucene.Net.QueryParsers.Flexible.Standard
Assembly: Lucene.Net.QueryParser.dll
Syntax
public interface ICommonQueryParserConfiguration
Properties
| Improve this Doc View SourceAllowLeadingWildcard
Set to true
to allow leading wildcard characters.
When set, *
or ?
are allowed as the first
character of a PrefixQuery and WildcardQuery. Note that this can produce
very slow queries on big indexes.
Default: false.
Declaration
bool AllowLeadingWildcard { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Analyzer
Declaration
Analyzer Analyzer { get; }
Property Value
Type | Description |
---|---|
Lucene.Net.Analysis.Analyzer |
EnablePositionIncrements
Set to true
to enable position increments in result query.
When set, result phrase and multi-phrase queries will be aware of position increments. Useful when e.g. a Lucene.Net.Analysis.Core.StopFilter increases the position increment of the token that follows an omitted token.
Default: false.
Declaration
bool EnablePositionIncrements { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
FuzzyMinSim
Get the minimal similarity for fuzzy queries.
Declaration
float FuzzyMinSim { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
FuzzyPrefixLength
Get or Set the prefix length for fuzzy queries. Default is 0.
Declaration
int FuzzyPrefixLength { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Locale
Get or Set locale used by date range parsing.
Declaration
CultureInfo Locale { get; set; }
Property Value
Type | Description |
---|---|
System.Globalization.CultureInfo |
LowercaseExpandedTerms
Whether terms of multi-term queries (e.g., wildcard,
prefix, fuzzy and range) should be automatically
lower-cased or not. Default is true
.
Declaration
bool LowercaseExpandedTerms { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
MultiTermRewriteMethod
By default, it uses CONSTANT_SCORE_AUTO_REWRITE_DEFAULT when creating a prefix, wildcard and range queries. This implementation is generally preferable because it a) Runs faster b) Does not have the scarcity of terms unduly influence score c) avoids any exception due to too many listeners. However, if your application really needs to use the old-fashioned boolean queries expansion rewriting and the above points are not relevant then use this change the rewrite method.
Declaration
MultiTermQuery.RewriteMethod MultiTermRewriteMethod { get; set; }
Property Value
Type | Description |
---|---|
Lucene.Net.Search.MultiTermQuery.RewriteMethod |
PhraseSlop
Gets or Sets the default slop for phrases. If zero, then exact phrase matches are required. Default value is zero.
Declaration
int PhraseSlop { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
TimeZone
Gets or Sets the time zone.
Declaration
TimeZoneInfo TimeZone { get; set; }
Property Value
Type | Description |
---|---|
System.TimeZoneInfo |
Methods
| Improve this Doc View SourceSetDateResolution(DateTools.Resolution)
Sets the default Lucene.Net.Documents.DateTools.Resolution used for certain field when no Lucene.Net.Documents.DateTools.Resolution is defined for this field.
Declaration
void SetDateResolution(DateTools.Resolution dateResolution)
Parameters
Type | Name | Description |
---|---|---|
Lucene.Net.Documents.DateTools.Resolution | dateResolution |