Search in sources :

Example 1 with PassthroughExpression

use of com.yahoo.vespa.indexinglanguage.expressions.PassthroughExpression in project vespa by vespa-engine.

the class IndexingScript method generateSyntheticStatementsForUntouchedFields.

private void generateSyntheticStatementsForUntouchedFields(Builder ilscriptBuilder, Set<String> touchedFields) {
    Set<String> fieldsWithSyntheticStatements = new HashSet<String>(docFields);
    fieldsWithSyntheticStatements.removeAll(touchedFields);
    List<String> orderedFields = new ArrayList<String>(fieldsWithSyntheticStatements);
    Collections.sort(orderedFields);
    for (String fieldName : orderedFields) {
        StatementExpression copyField = new StatementExpression(new InputExpression(fieldName), new PassthroughExpression(fieldName));
        ilscriptBuilder.content(copyField.toString());
    }
}
Also used : PassthroughExpression(com.yahoo.vespa.indexinglanguage.expressions.PassthroughExpression) StatementExpression(com.yahoo.vespa.indexinglanguage.expressions.StatementExpression) ArrayList(java.util.ArrayList) InputExpression(com.yahoo.vespa.indexinglanguage.expressions.InputExpression) HashSet(java.util.HashSet)

Aggregations

InputExpression (com.yahoo.vespa.indexinglanguage.expressions.InputExpression)1 PassthroughExpression (com.yahoo.vespa.indexinglanguage.expressions.PassthroughExpression)1 StatementExpression (com.yahoo.vespa.indexinglanguage.expressions.StatementExpression)1 ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1