Class SimpleBindings
Simple class that binds expression variable names to
Example usage:
SimpleBindings bindings = new SimpleBindings();
// document's text relevance score
bindings.Add(new SortField("_score", SortFieldType.SCORE));
// integer NumericDocValues field (or from FieldCache)
bindings.Add(new SortField("popularity", SortFieldType.INT));
// another expression
bindings.Add("recency", myRecencyExpression);
// create a sort field in reverse order
Sort sort = new Sort(expr.GetSortField(bindings, true));
@lucene.experimental
Inherited Members
Assembly: Lucene.Net.Expressions.dll
Syntax
public sealed class SimpleBindings : Bindings
Constructors
Name | Description |
---|---|
SimpleBindings() | Creates a new empty Bindings |
Methods
Name | Description |
---|---|
Add(SortField) | Adds a |
Add(String, Expression) | Adds an Expression to the bindings. |
GetValueSource(String) | |
Validate() | Traverses the graph of bindings, checking there are no cycles or missing references |