Interface AnalyticsValueStream

    • Method Detail

      • getName

        String getName()
        Get the name of function or value.
        Returns:
        the name of function/value
      • getExpressionStr

        String getExpressionStr()
        Get the expression string of the analytics value stream. Must be unique to the expression. If passed to ExpressionFactory.createExpression(String), the exact same expression should be created.
        Returns:
        the name of function/value
      • streamObjects

        void streamObjects​(Consumer<Object> cons)
        Stream the object representations of all current values, if any exist.
        Parameters:
        cons - The consumer to accept the values
      • createExpressionString

        static String createExpressionString​(String funcName,
                                             AnalyticsValueStream... params)
        Helper to create an expression string for a function.
        Parameters:
        funcName - the name of the function
        params - the parameters of the function
        Returns:
        a valid expression string for the function.
      • determineMappingPhase

        static AnalyticsValueStream.ExpressionType determineMappingPhase​(String exprString,
                                                                         AnalyticsValueStream... params)
                                                                  throws org.apache.solr.common.SolrException
        Determine whether the expression is a unreduced mapping expression, a reduced mapping expression, or a constant.
        Parameters:
        exprString - the string representing the expression, used when creating exceptions
        params - the parameters
        Returns:
        the expression type
        Throws:
        org.apache.solr.common.SolrException - if the params are incompatable types, for example if reduced and unreduced params are both included