Search in sources :

Example 1 with IndexingInput

use of com.yahoo.vespa.indexinglanguage.parser.IndexingInput in project vespa by vespa-engine.

the class SDField method parseIndexingScript.

public void parseIndexingScript(String script, Linguistics linguistics) {
    try {
        ScriptParserContext config = new ScriptParserContext(linguistics);
        config.setInputStream(new IndexingInput(script));
        setIndexingScript(ScriptExpression.newInstance(config));
    } catch (ParseException e) {
        throw new RuntimeException("Failed to parser script '" + script + "'.", e);
    }
}
Also used : IndexingInput(com.yahoo.vespa.indexinglanguage.parser.IndexingInput) ParseException(com.yahoo.vespa.indexinglanguage.parser.ParseException) ScriptParserContext(com.yahoo.vespa.indexinglanguage.ScriptParserContext)

Aggregations

ScriptParserContext (com.yahoo.vespa.indexinglanguage.ScriptParserContext)1 IndexingInput (com.yahoo.vespa.indexinglanguage.parser.IndexingInput)1 ParseException (com.yahoo.vespa.indexinglanguage.parser.ParseException)1