Table of Contents

Class LuceneBooleanOperation

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

An implementation of the fluent API boolean operations

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

Constructors

LuceneBooleanOperation(LuceneSearchQuery)

public LuceneBooleanOperation(LuceneSearchQuery search)

Parameters

search LuceneSearchQuery

Methods

And()

Sets the next operation to be AND

public override IQuery And()

Returns

IQuery

AndNested()

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

protected override INestedQuery AndNested()

Returns

INestedQuery

Execute(QueryOptions?)

Executes the query

public override ISearchResults Execute(QueryOptions? options = null)

Parameters

options QueryOptions

Returns

ISearchResults

Not()

Sets the next operation to be NOT

public override IQuery Not()

Returns

IQuery

NotNested()

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

protected override INestedQuery NotNested()

Returns

INestedQuery

Or()

Sets the next operation to be OR

public override IQuery Or()

Returns

IQuery

OrNested()

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

protected override INestedQuery OrNested()

Returns

INestedQuery

OrderBy(params SortableField[])

Orders the results by the specified fields

public override 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 override IOrdering OrderByDescending(params SortableField[] fields)

Parameters

fields SortableField[]

The field names.

Returns

IOrdering

SelectAllFields()

Return all fields in the index

public override 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 override 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 override IOrdering SelectFields(ISet<string> fieldNames)

Parameters

fieldNames ISet<string>

The field names for fields to load

Returns

IOrdering

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

WithFacets(Action<IFacetOperations>)

Allows for selecting facets to return in your query

public override IQueryExecutor WithFacets(Action<IFacetOperations> facets)

Parameters

facets Action<IFacetOperations>

Returns

IQueryExecutor