Class ArrayAtLookup


  • @Beta
    public class ArrayAtLookup
    extends DocumentValue
    Represents access of array element in a document attribute in a GroupingExpression. The first argument should be the name of an array attribute in the input Hit, while the second argument is evaluated as an integer and used as the index in that array. If the index argument is less than 0 returns the first array element; if the index is greater than or equal to size(array) returns the last array element; if the array is empty returns 0 (or NaN?).
    Author:
    arnej27959
    • Constructor Detail

      • ArrayAtLookup

        public ArrayAtLookup​(java.lang.String attributeName,
                             GroupingExpression indexArg)
        Constructs a new instance of this class.
        Parameters:
        attributeName - the attribute name to assign to this.
    • Method Detail

      • getAttributeName

        public java.lang.String getAttributeName()
        Returns the name of the attribute to retrieve from the input hit
      • getIndexArgument

        public GroupingExpression getIndexArgument()
        Return the expression to evaluate before indexing