Package org.elasticsearch.script.ScriptService

Examples of org.elasticsearch.script.ScriptService.ScriptType


                crawlSettings, "script");
        final String script = SettingsUtils.get(scriptSettings, target);
        final String lang = SettingsUtils.get(scriptSettings, "lang", "groovy");
        final String scriptTypeValue = SettingsUtils.get(scriptSettings,
                "script_type", "inline");
        ScriptType scriptType;
        if (ScriptType.FILE.toString().equalsIgnoreCase(scriptTypeValue)) {
            scriptType = ScriptType.FILE;
        } else if (ScriptType.INDEXED.toString().equalsIgnoreCase(
                scriptTypeValue)) {
            scriptType = ScriptType.INDEXED;
View Full Code Here


        storeIndex(responseData, dataMap);
    }

    private Object executeScript(final String lang, final String script,
            final String scriptTypeValue, final Map<String, Object> vars) {
        ScriptType scriptType;
        if (ScriptType.FILE.toString().equalsIgnoreCase(scriptTypeValue)) {
            scriptType = ScriptType.FILE;
        } else if (ScriptType.INDEXED.toString().equalsIgnoreCase(
                scriptTypeValue)) {
            scriptType = ScriptType.INDEXED;
View Full Code Here

    private void parseTransform(DocumentMapper.Builder docBuilder, Map<String, Object> transformConfig) {
        ScriptParameterParser scriptParameterParser = new ScriptParameterParser();
        scriptParameterParser.parseConfig(transformConfig, true);
       
        String script = null;
        ScriptType scriptType = null;
        ScriptParameterValue scriptValue = scriptParameterParser.getDefaultScriptParameterValue();
        if (scriptValue != null) {
            script = scriptValue.script();
            scriptType = scriptValue.scriptType();
        }
View Full Code Here

            }
        }
       
        ScriptParameterValue initScriptValue = scriptParameterParser.getScriptParameterValue(INIT_SCRIPT);
        String initScript = null;
        ScriptType initScriptType = null;
        if (initScriptValue != null) {
            initScript = initScriptValue.script();
            initScriptType = initScriptValue.scriptType();
        }
        ScriptParameterValue mapScriptValue = scriptParameterParser.getScriptParameterValue(MAP_SCRIPT);
        String mapScript = null;
        ScriptType mapScriptType = null;
        if (mapScriptValue != null) {
            mapScript = mapScriptValue.script();
            mapScriptType = mapScriptValue.scriptType();
        }
        ScriptParameterValue combineScriptValue = scriptParameterParser.getScriptParameterValue(COMBINE_SCRIPT);
        String combineScript = null;
        ScriptType combineScriptType = null;
        if (combineScriptValue != null) {
            combineScript = combineScriptValue.script();
            combineScriptType = combineScriptValue.scriptType();
        }
        ScriptParameterValue reduceScriptValue = scriptParameterParser.getScriptParameterValue(REDUCE_SCRIPT);
        String reduceScript = null;
        ScriptType reduceScriptType = null;
        if (reduceScriptValue != null) {
            reduceScript = reduceScriptValue.script();
            reduceScriptType = reduceScriptValue.scriptType();
        }
        scriptLang = scriptParameterParser.lang();
View Full Code Here

TOP

Related Classes of org.elasticsearch.script.ScriptService.ScriptType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.