Class GenerateExpression

java.lang.Object
com.yahoo.vespa.objects.Selectable
com.yahoo.vespa.indexinglanguage.expressions.Expression
com.yahoo.vespa.indexinglanguage.expressions.GenerateExpression

public class GenerateExpression extends Expression
Indexing language expression for generating field values with LLMs and custom components.
Author:
glebashnik
  • Constructor Details

    • GenerateExpression

      public GenerateExpression(com.yahoo.language.Linguistics linguistics, Components<com.yahoo.language.process.FieldGenerator> generators, String generatorId, List<String> generatorArguments)
  • Method Details

    • setInputType

      public com.yahoo.document.DataType setInputType(com.yahoo.document.DataType inputType, TypeContext context)
      Description copied from class: Expression
      Sets the input type of this and returns the resulting output type, or null if it cannot be uniquely determined. Subtypes may implement this by calling setInputType(inputType, requiredType, VerificationContext context).
      Overrides:
      setInputType in class Expression
    • setOutputType

      public com.yahoo.document.DataType setOutputType(com.yahoo.document.DataType outputType, TypeContext context)
      Description copied from class: Expression
      Sets the output type of this and returns the resulting input type, or null if it cannot be uniquely determined. Subtypes implement this by calling setOutputType(outputType, requiredType, VerificationContext context).
      Overrides:
      setOutputType in class Expression
    • setStatementOutput

      public void setStatementOutput(com.yahoo.document.DocumentType documentType, com.yahoo.document.Field field)
      Description copied from class: Expression
      Sets the document type and field the statement this expression is part of will write to
      Overrides:
      setStatementOutput in class Expression
    • doResolve

      protected void doResolve(TypeContext context)
      Overrides:
      doResolve in class Expression
    • doExecute

      protected void doExecute(ExecutionContext context)
      Specified by:
      doExecute in class Expression
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object