Show / Hide Table of Contents

    Class SimpleBindings

    Simple class that binds expression variable names to s or other Expressions.

    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));
    This is a Lucene.NET EXPERIMENTAL API, use at your own risk
    Inheritance
    System.Object
    Bindings
    SimpleBindings
    Inherited Members
    Bindings.GetScoreValueSource()
    Namespace: Lucene.Net.Expressions
    Assembly: Lucene.Net.Expressions.dll
    Syntax
    public sealed class SimpleBindings : Bindings

    Constructors

    | Improve this Doc View Source

    SimpleBindings()

    Creates a new empty Bindings

    Declaration
    public SimpleBindings()

    Methods

    | Improve this Doc View Source

    Add(SortField)

    Adds a to the bindings.

    Declaration
    public void Add(SortField sortField)
    Parameters
    Type Name Description
    SortField sortField
    Remarks

    Adds a to the bindings.

    This can be used to reference a DocValuesField, a field from FieldCache, the document's score, etc.

    | Improve this Doc View Source

    Add(String, Expression)

    Adds an Expression to the bindings.

    Declaration
    public void Add(string name, Expression expression)
    Parameters
    Type Name Description
    System.String name
    Expression expression
    Remarks

    Adds an Expression to the bindings.

    This can be used to reference expressions from other expressions.

    | Improve this Doc View Source

    GetValueSource(String)

    Declaration
    public override ValueSource GetValueSource(string name)
    Parameters
    Type Name Description
    System.String name
    Returns
    Type Description
    ValueSource
    Overrides
    Bindings.GetValueSource(String)
    | Improve this Doc View Source

    Validate()

    Traverses the graph of bindings, checking there are no cycles or missing references

    Declaration
    public void Validate()
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)