Table of Contents

Class LuceneFilter

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

Lucene Filter

public class LuceneFilter : IFilter, INestedFilter
Inheritance
LuceneFilter
Implements
Inherited Members

Constructors

LuceneFilter(LuceneSearchFilteringOperation, Occur)

Initializes a new instance of the LuceneFilter class.

public LuceneFilter(LuceneSearchFilteringOperation search, Occur occurrence)

Parameters

search LuceneSearchFilteringOperation

The filter.

occurrence Occur

The occurance.

Methods

ChainFilters(Action<IFilterChain>)

Chain filters

public IBooleanFilterOperation ChainFilters(Action<IFilterChain> chain)

Parameters

chain Action<IFilterChain>

Returns

IBooleanFilterOperation

DoubleRangeFilter(string, double?, double?, bool, bool)

Matches items as defined by the IIndexFieldValueType used for the fields specified. If a type is not defined for a field name, or the type does not implement IIndexRangeValueType for the types of min and max, nothing will be added

public IBooleanFilterOperation DoubleRangeFilter(string field, double? min, double? max, bool minInclusive, bool maxInclusive)

Parameters

field string
min double?
max double?
minInclusive bool
maxInclusive bool

Returns

IBooleanFilterOperation

FieldValueExistsFilter(string)

Document must have value for field

public IBooleanFilterOperation FieldValueExistsFilter(string field)

Parameters

field string

Returns

IBooleanFilterOperation

FieldValueNotExistsFilter(string)

Document must not have value for field

public IBooleanFilterOperation FieldValueNotExistsFilter(string field)

Parameters

field string

Returns

IBooleanFilterOperation

FloatRangeFilter(string, float?, float?, bool, bool)

Matches items as defined by the IIndexFieldValueType used for the fields specified. If a type is not defined for a field name, or the type does not implement IIndexRangeValueType for the types of min and max, nothing will be added

public IBooleanFilterOperation FloatRangeFilter(string field, float? min, float? max, bool minInclusive, bool maxInclusive)

Parameters

field string
min float?
max float?
minInclusive bool
maxInclusive bool

Returns

IBooleanFilterOperation

IntRangeFilter(string, int?, int?, bool, bool)

Matches items as defined by the IIndexFieldValueType used for the fields specified. If a type is not defined for a field name, or the type does not implement IIndexRangeValueType for the types of min and max, nothing will be added

public IBooleanFilterOperation IntRangeFilter(string field, int? min, int? max, bool minInclusive, bool maxInclusive)

Parameters

field string
min int?
max int?
minInclusive bool
maxInclusive bool

Returns

IBooleanFilterOperation

LongRangeFilter(string, long?, long?, bool, bool)

Matches items as defined by the IIndexFieldValueType used for the fields specified. If a type is not defined for a field name, or the type does not implement IIndexRangeValueType for the types of min and max, nothing will be added

public IBooleanFilterOperation LongRangeFilter(string field, long? min, long? max, bool minInclusive, bool maxInclusive)

Parameters

field string
min long?
max long?
minInclusive bool
maxInclusive bool

Returns

IBooleanFilterOperation

NestedFieldValueExists(string)

Document must have value for field

public INestedBooleanFilterOperation NestedFieldValueExists(string field)

Parameters

field string

Returns

INestedBooleanFilterOperation

NestedFieldValueNotExists(string)

Document must not have value for field

public INestedBooleanFilterOperation NestedFieldValueNotExists(string field)

Parameters

field string

Returns

INestedBooleanFilterOperation

NestedQueryFilter(Func<INestedQuery, INestedBooleanOperation>, BooleanOperation)

Must match query

public INestedBooleanFilterOperation NestedQueryFilter(Func<INestedQuery, INestedBooleanOperation> inner, BooleanOperation defaultOp = BooleanOperation.And)

Parameters

inner Func<INestedQuery, INestedBooleanOperation>
defaultOp BooleanOperation

Returns

INestedBooleanFilterOperation

NestedSpatialOperationFilter(string, ExamineSpatialOperation, Func<IExamineSpatialShapeFactory, IExamineSpatialShape>)

Executes Spatial operation as a Filter on field and shape

public INestedBooleanFilterOperation NestedSpatialOperationFilter(string field, ExamineSpatialOperation spatialOperation, Func<IExamineSpatialShapeFactory, IExamineSpatialShape> shape)

Parameters

field string

Index field name

spatialOperation ExamineSpatialOperation
shape Func<IExamineSpatialShapeFactory, IExamineSpatialShape>

Shape

Returns

INestedBooleanFilterOperation

NestedTermFilter(FilterTerm)

Term must match

public INestedBooleanFilterOperation NestedTermFilter(FilterTerm term)

Parameters

term FilterTerm

Returns

INestedBooleanFilterOperation

NestedTermPrefix(FilterTerm)

Term must match as prefix

public INestedBooleanFilterOperation NestedTermPrefix(FilterTerm term)

Parameters

term FilterTerm

Returns

INestedBooleanFilterOperation

NestedTermsFilter(IEnumerable<FilterTerm>)

Terms must match

public INestedBooleanFilterOperation NestedTermsFilter(IEnumerable<FilterTerm> terms)

Parameters

terms IEnumerable<FilterTerm>

Returns

INestedBooleanFilterOperation

QueryFilter(Func<INestedQuery, INestedBooleanOperation>, BooleanOperation)

Must match query

public IBooleanFilterOperation QueryFilter(Func<INestedQuery, INestedBooleanOperation> inner, BooleanOperation defaultOp = BooleanOperation.And)

Parameters

inner Func<INestedQuery, INestedBooleanOperation>
defaultOp BooleanOperation

Returns

IBooleanFilterOperation

SpatialOperationFilter(string, ExamineSpatialOperation, Func<IExamineSpatialShapeFactory, IExamineSpatialShape>)

Executes Spatial operation as a Filter on field and shape

public IBooleanFilterOperation SpatialOperationFilter(string field, ExamineSpatialOperation spatialOperation, Func<IExamineSpatialShapeFactory, IExamineSpatialShape> shape)

Parameters

field string

Index field name

spatialOperation ExamineSpatialOperation
shape Func<IExamineSpatialShapeFactory, IExamineSpatialShape>

Shape

Returns

IBooleanFilterOperation

TermFilter(FilterTerm)

Term must match

public IBooleanFilterOperation TermFilter(FilterTerm term)

Parameters

term FilterTerm

Returns

IBooleanFilterOperation

TermPrefixFilter(FilterTerm)

Term must match as prefix

public IBooleanFilterOperation TermPrefixFilter(FilterTerm term)

Parameters

term FilterTerm

Returns

IBooleanFilterOperation

TermsFilter(IEnumerable<FilterTerm>)

Terms must match

public IBooleanFilterOperation TermsFilter(IEnumerable<FilterTerm> terms)

Parameters

terms IEnumerable<FilterTerm>

Returns

IBooleanFilterOperation