[FIX] Indexed scripts should always use script_id.

This commit is contained in:
Brian Murphy 2014-07-22 13:49:31 +01:00
parent 55df94d91e
commit ebcc1e0bf5
4 changed files with 4 additions and 4 deletions

View File

@ -85,7 +85,7 @@ public class ScriptFilterParser implements FilterParser {
if ("script".equals(currentFieldName)) {
script = parser.text();
scriptType = ScriptService.ScriptType.INLINE;
} else if ("id".equals(currentFieldName)) {
} else if ("script_id".equals(currentFieldName)) {
script = parser.text();
scriptType = ScriptService.ScriptType.INDEXED;
} else if ("file".equals(currentFieldName)) {

View File

@ -71,7 +71,7 @@ public class ScriptScoreFunctionParser implements ScoreFunctionParser {
} else if (token.isValue()) {
if ("script".equals(currentFieldName)) {
script = parser.text();
} else if ("id".equals(currentFieldName)) {
} else if ("script_id".equals(currentFieldName)) {
script = parser.text();
scriptType = ScriptService.ScriptType.INDEXED;
} else if ("file".equals(currentFieldName)) {

View File

@ -95,7 +95,7 @@ public class StatisticalFacetParser extends AbstractComponent implements FacetPa
} else if ("script".equals(currentFieldName)) {
script = parser.text();
scriptType = ScriptService.ScriptType.INLINE;
} else if ("id".equals(currentFieldName)) {
} else if ("script_id".equals(currentFieldName)) {
script = parser.text();
scriptType = ScriptService.ScriptType.INDEXED;
} else if ("file".equals(currentFieldName)) {

View File

@ -66,7 +66,7 @@ public class ScriptFieldsParseElement implements SearchParseElement {
if ("script".equals(currentFieldName)) {
script = parser.text();
scriptType = ScriptService.ScriptType.INLINE;
} else if ("id".equals(currentFieldName)) {
} else if ("script_id".equals(currentFieldName)) {
script = parser.text();
scriptType = ScriptService.ScriptType.INDEXED;
} else if ("file".equals(currentFieldName)) {