mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-04-01 04:48:28 +00:00
Remove ParseFieldMatcher usage from SearchRequest
Original commit: elastic/x-pack-elasticsearch@e1b08ab801
This commit is contained in:
parent
dd26c93f68
commit
33653a8865
@ -16,14 +16,10 @@ import org.elasticsearch.common.Strings;
|
|||||||
import org.elasticsearch.common.bytes.BytesReference;
|
import org.elasticsearch.common.bytes.BytesReference;
|
||||||
import org.elasticsearch.common.xcontent.ToXContent;
|
import org.elasticsearch.common.xcontent.ToXContent;
|
||||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||||
import org.elasticsearch.common.xcontent.XContentHelper;
|
|
||||||
import org.elasticsearch.common.xcontent.XContentParser;
|
import org.elasticsearch.common.xcontent.XContentParser;
|
||||||
import org.elasticsearch.index.query.QueryParseContext;
|
|
||||||
import org.elasticsearch.script.Script;
|
import org.elasticsearch.script.Script;
|
||||||
import org.elasticsearch.script.ScriptType;
|
import org.elasticsearch.script.ScriptType;
|
||||||
import org.elasticsearch.search.SearchRequestParsers;
|
import org.elasticsearch.search.SearchRequestParsers;
|
||||||
import org.elasticsearch.search.builder.SearchSourceBuilder;
|
|
||||||
import org.elasticsearch.xpack.common.text.TextTemplate;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -269,7 +265,7 @@ public class WatcherSearchTemplateRequest implements ToXContent {
|
|||||||
String typesStr = parser.text();
|
String typesStr = parser.text();
|
||||||
types.addAll(Arrays.asList(Strings.delimitedListToStringArray(typesStr, ",", " \t")));
|
types.addAll(Arrays.asList(Strings.delimitedListToStringArray(typesStr, ",", " \t")));
|
||||||
} else if (SEARCH_TYPE_FIELD.match(currentFieldName)) {
|
} else if (SEARCH_TYPE_FIELD.match(currentFieldName)) {
|
||||||
searchType = SearchType.fromString(parser.text().toLowerCase(Locale.ROOT), ParseFieldMatcher.EMPTY);
|
searchType = SearchType.fromString(parser.text().toLowerCase(Locale.ROOT));
|
||||||
} else {
|
} else {
|
||||||
throw new ElasticsearchParseException("could not read search request. unexpected string field [" +
|
throw new ElasticsearchParseException("could not read search request. unexpected string field [" +
|
||||||
currentFieldName + "]");
|
currentFieldName + "]");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user