[FIX] Indexed scripts should always use script_id.
This commit is contained in:
parent
55df94d91e
commit
ebcc1e0bf5
|
@ -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)) {
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue