Table of Contents

Class LuceneBooleanOperationBase

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

Represents the base for a LuceneBooleanOperation

public abstract class LuceneBooleanOperationBase : IBooleanOperation, INestedBooleanOperation, IOrdering, IQueryExecutor, IFaceting
Inheritance
LuceneBooleanOperationBase
Implements
Derived
Inherited Members
Extension Methods

Constructors

LuceneBooleanOperationBase(LuceneSearchQueryBase)

protected LuceneBooleanOperationBase(LuceneSearchQueryBase search)

Parameters

search LuceneSearchQueryBase

Methods

And()

Sets the next operation to be AND

public abstract IQuery And()

Returns

IQuery

And(Func<INestedQuery, INestedBooleanOperation>, BooleanOperation)

Allows for adding more operations to a query using the and operator

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

Parameters

inner Func<INestedQuery, INestedBooleanOperation>
defaultOp BooleanOperation

Returns

IBooleanOperation

AndNested()

Allows for adding more operations to a query using a nested and

protected abstract INestedQuery AndNested()

Returns

INestedQuery

AndNot(Func<INestedQuery, INestedBooleanOperation>, BooleanOperation)

Allows for adding more operations to a query using the and not operator

public IBooleanOperation AndNot(Func<INestedQuery, INestedBooleanOperation> inner, BooleanOperation defaultOp = BooleanOperation.And)

Parameters

inner Func<INestedQuery, INestedBooleanOperation>
defaultOp BooleanOperation

Returns

IBooleanOperation

Execute(QueryOptions?)

Executes the query

public abstract ISearchResults Execute(QueryOptions? options = null)

Parameters

options QueryOptions

Returns

ISearchResults

Not()

Sets the next operation to be NOT

public abstract IQuery Not()

Returns

IQuery

NotNested()

Allows for adding more operations to a query iusing a nested not

protected abstract INestedQuery NotNested()

Returns

INestedQuery

Op(Func<INestedQuery, INestedBooleanOperation>, BooleanOperation, BooleanOperation?)

Used to add a operation

protected LuceneBooleanOperationBase Op(Func<INestedQuery, INestedBooleanOperation> inner, BooleanOperation outerOp, BooleanOperation? defaultInnerOp = null)

Parameters

inner Func<INestedQuery, INestedBooleanOperation>
outerOp BooleanOperation
defaultInnerOp BooleanOperation?

Returns

LuceneBooleanOperationBase

Or()

Sets the next operation to be OR

public abstract IQuery Or()

Returns

IQuery

Or(Func<INestedQuery, INestedBooleanOperation>, BooleanOperation)

Allows for adding more operations to a query using the or operator

public IBooleanOperation Or(Func<INestedQuery, INestedBooleanOperation> inner, BooleanOperation defaultOp = BooleanOperation.And)

Parameters

inner Func<INestedQuery, INestedBooleanOperation>
defaultOp BooleanOperation

Returns

IBooleanOperation

OrNested()

Allows for adding more operations to a query using a nested or

protected abstract INestedQuery OrNested()

Returns

INestedQuery

OrderBy(params SortableField[])

Orders the results by the specified fields

public abstract IOrdering OrderBy(params SortableField[] fields)

Parameters

fields SortableField[]

The field names.

Returns

IOrdering

OrderByDescending(params SortableField[])

Orders the results by the specified fields in a descending order

public abstract IOrdering OrderByDescending(params SortableField[] fields)

Parameters

fields SortableField[]

The field names.

Returns

IOrdering

SelectAllFields()

Return all fields in the index

public abstract IOrdering SelectAllFields()

Returns

IOrdering

SelectField(string)

Return only the specified field. Use SelectFields(ISet<string>) when possible as internally a new HashSet is created on each call

public abstract IOrdering SelectField(string fieldName)

Parameters

fieldName string

The field name of the field to load

Returns

IOrdering

SelectFields(ISet<string>)

Return only the specified fields

public abstract IOrdering SelectFields(ISet<string> fieldNames)

Parameters

fieldNames ISet<string>

The field names for fields to load

Returns

IOrdering

WithFacets(Action<IFacetOperations>)

Allows for selecting facets to return in your query

public abstract IQueryExecutor WithFacets(Action<IFacetOperations> facets)

Parameters

facets Action<IFacetOperations>

Returns

IQueryExecutor