mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-25 22:36:20 +00:00
[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)) {
|
if ("script".equals(currentFieldName)) {
|
||||||
script = parser.text();
|
script = parser.text();
|
||||||
scriptType = ScriptService.ScriptType.INLINE;
|
scriptType = ScriptService.ScriptType.INLINE;
|
||||||
} else if ("id".equals(currentFieldName)) {
|
} else if ("script_id".equals(currentFieldName)) {
|
||||||
script = parser.text();
|
script = parser.text();
|
||||||
scriptType = ScriptService.ScriptType.INDEXED;
|
scriptType = ScriptService.ScriptType.INDEXED;
|
||||||
} else if ("file".equals(currentFieldName)) {
|
} else if ("file".equals(currentFieldName)) {
|
||||||
|
@ -71,7 +71,7 @@ public class ScriptScoreFunctionParser implements ScoreFunctionParser {
|
|||||||
} else if (token.isValue()) {
|
} else if (token.isValue()) {
|
||||||
if ("script".equals(currentFieldName)) {
|
if ("script".equals(currentFieldName)) {
|
||||||
script = parser.text();
|
script = parser.text();
|
||||||
} else if ("id".equals(currentFieldName)) {
|
} else if ("script_id".equals(currentFieldName)) {
|
||||||
script = parser.text();
|
script = parser.text();
|
||||||
scriptType = ScriptService.ScriptType.INDEXED;
|
scriptType = ScriptService.ScriptType.INDEXED;
|
||||||
} else if ("file".equals(currentFieldName)) {
|
} else if ("file".equals(currentFieldName)) {
|
||||||
|
@ -95,7 +95,7 @@ public class StatisticalFacetParser extends AbstractComponent implements FacetPa
|
|||||||
} else if ("script".equals(currentFieldName)) {
|
} else if ("script".equals(currentFieldName)) {
|
||||||
script = parser.text();
|
script = parser.text();
|
||||||
scriptType = ScriptService.ScriptType.INLINE;
|
scriptType = ScriptService.ScriptType.INLINE;
|
||||||
} else if ("id".equals(currentFieldName)) {
|
} else if ("script_id".equals(currentFieldName)) {
|
||||||
script = parser.text();
|
script = parser.text();
|
||||||
scriptType = ScriptService.ScriptType.INDEXED;
|
scriptType = ScriptService.ScriptType.INDEXED;
|
||||||
} else if ("file".equals(currentFieldName)) {
|
} else if ("file".equals(currentFieldName)) {
|
||||||
|
@ -66,7 +66,7 @@ public class ScriptFieldsParseElement implements SearchParseElement {
|
|||||||
if ("script".equals(currentFieldName)) {
|
if ("script".equals(currentFieldName)) {
|
||||||
script = parser.text();
|
script = parser.text();
|
||||||
scriptType = ScriptService.ScriptType.INLINE;
|
scriptType = ScriptService.ScriptType.INLINE;
|
||||||
} else if ("id".equals(currentFieldName)) {
|
} else if ("script_id".equals(currentFieldName)) {
|
||||||
script = parser.text();
|
script = parser.text();
|
||||||
scriptType = ScriptService.ScriptType.INDEXED;
|
scriptType = ScriptService.ScriptType.INDEXED;
|
||||||
} else if ("file".equals(currentFieldName)) {
|
} else if ("file".equals(currentFieldName)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user