Class LuceneBooleanOperation
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
searchLuceneSearchQuery
Methods
And()
Sets the next operation to be AND
public override IQuery And()
Returns
AndNested()
Allows for adding more operations to a query using a nested and
protected override INestedQuery AndNested()
Returns
Execute(QueryOptions?)
Executes the query
public override ISearchResults Execute(QueryOptions? options = null)
Parameters
optionsQueryOptions
Returns
Not()
Sets the next operation to be NOT
public override IQuery Not()
Returns
NotNested()
Allows for adding more operations to a query iusing a nested not
protected override INestedQuery NotNested()
Returns
Or()
Sets the next operation to be OR
public override IQuery Or()
Returns
OrNested()
Allows for adding more operations to a query using a nested or
protected override INestedQuery OrNested()
Returns
OrderBy(params SortableField[])
Orders the results by the specified fields
public override IOrdering OrderBy(params SortableField[] fields)
Parameters
fieldsSortableField[]The field names.
Returns
OrderByDescending(params SortableField[])
Orders the results by the specified fields in a descending order
public override IOrdering OrderByDescending(params SortableField[] fields)
Parameters
fieldsSortableField[]The field names.
Returns
SelectAllFields()
Return all fields in the index
public override IOrdering SelectAllFields()
Returns
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
fieldNamestringThe field name of the field to load
Returns
SelectFields(ISet<string>)
Return only the specified fields
public override IOrdering SelectFields(ISet<string> fieldNames)
Parameters
Returns
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
facetsAction<IFacetOperations>