Class LuceneBooleanOperationBase
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
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
AndNested()
Allows for adding more operations to a query using a nested and
protected abstract INestedQuery AndNested()
Returns
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
Execute(QueryOptions?)
Executes the query
public abstract ISearchResults Execute(QueryOptions? options = null)
Parameters
options
QueryOptions
Returns
Not()
Sets the next operation to be NOT
public abstract IQuery Not()
Returns
NotNested()
Allows for adding more operations to a query iusing a nested not
protected abstract INestedQuery NotNested()
Returns
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
BooleanOperationdefaultInnerOp
BooleanOperation?
Returns
Or()
Sets the next operation to be OR
public abstract IQuery Or()
Returns
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
OrNested()
Allows for adding more operations to a query using a nested or
protected abstract INestedQuery OrNested()
Returns
OrderBy(params SortableField[])
Orders the results by the specified fields
public abstract IOrdering OrderBy(params SortableField[] fields)
Parameters
fields
SortableField[]The field names.
Returns
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
SelectAllFields()
Return all fields in the index
public abstract 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 abstract IOrdering SelectField(string fieldName)
Parameters
fieldName
stringThe field name of the field to load
Returns
SelectFields(ISet<string>)
Return only the specified fields
public abstract IOrdering SelectFields(ISet<string> fieldNames)
Parameters
Returns
WithFacets(Action<IFacetOperations>)
Allows for selecting facets to return in your query
public abstract IQueryExecutor WithFacets(Action<IFacetOperations> facets)
Parameters
facets
Action<IFacetOperations>