![]() ![]() ![]() ![]() The PM specifies that it is needed that artists name and surname should be the source of suggestions. The problematic artist currently rocking in the charts and attracting a lot of attention is Britney Spears & Elton John. You try to argue that it will take forever to change upstream indexing pipeline because it is owned by another department of your company. On top he adds that he doesn’t care whether that makes sense from search engineers perspective, it must be done 2. Of course, the deadline is yesterday, as always. So, you are a search engineer that happily uses Elasticsearch Completion Suggester feature: lightning speed prefix suggestions works just like a charm 1.īut one day the product manager comes to you with a requirement: could we also suggest if users start typing a word from the middle of the suggested string?. Public void onApplicationElasticSample(RestHighLevelClient elasticClient) throws IOException Īt .performRequest(RestHighLevelClient.java:1275) ~Īt .performRequestAndParseEntity(RestHighLevelClient.java:1231) ~Īt .search(RestHighLevelClient.java:730) ~Īt .onApplicationElasticSample(MongoApplicationWatcher.java:166) Īt .run(MongoApplicationWatcher.java:111) Īt .callRunner(SpringApplication.java:800) ~Ĭaused by: .XContentParseException: failed to parse field Īt .ObjectParser.parseValue(ObjectParser.java:316) ~Īt .ObjectParser.parseArray(ObjectParser.java:308) ~Īt .ObjectParser.parseSub(ObjectParser.java:329) ~Īt .ObjectParser.parse(ObjectParser.java:168) ~Īt .ObjectParser.apply(ObjectParser.java:182) ~Īt .completion.CompletionSuggestion$omXContent(CompletionSuggestion.java:257) ~Īt .Suggest$Suggestion.parseEntries(Suggest.java:413) ~Īt .(CompletionSuggestion.java:126) ~Īt .lambda$getDefaultNamedXContents$58(RestHighLevelClient.java:1490) ~Īt .NamedXContentRegistry.parseNamedObject(NamedXContentRegistry.java:141) ~Īt .(AbstractXContentParser.java:433) ~Īt .XContentParserUtils.parseTypedKeysObject(XContentParserUtils.java:153) ~Īt .Suggest$omXContent(Suggest.java:404) ~Īt .omXContent(Suggest.java:187) ~Īt .SearchResponse.innerFromXContent(SearchResponse.java:291) ~Īt .omXContent(SearchResponse.java:248) ~Īt .parseEntity(RestHighLevelClient.java:1406) ~Īt .lambda$performRequestAndParseEntity$9(RestHighLevelClient.java:1232) ~Īt .performRequest(RestHighLevelClient.java:1273) ~Ĭaused by: .XContentParseException: _ignored doesn't support values of type: START_ARRAYĪt .ObjectParser$FieldParser.assertSupports(ObjectParser.java:373) ~Īt .ObjectParser.parse(ObjectParser.java:167) ~Īt .completion.CompletionSuggestion$Entry$omXContent(CompletionSuggestion.java:356) ~Īt .completion.CompletionSuggestion$Entry.lambda$static$0(CompletionSuggestion.java:253) ~Īt .AbstractObjectParser.lambda$declareObjectArray$7(AbstractObjectParser.java:184) ~Īt .AbstractObjectParser.lambda$declareFieldArray$13(AbstractObjectParser.java:212) ~Īt .AbstractObjectParser.parseArray(AbstractObjectParser.java:230) ~Īt .AbstractObjectParser.lambda$declareFieldArray$14(AbstractObjectParser.java:212) ~Īt .ObjectParser.lambda$declareField$1(ObjectParser.java:213) ~Īt .ObjectParser.parseValue(ObjectParser.Elasticsearch text analyzers can supercharge search suggesters. * Code where I am invoking the java client code for the suggestion based search with certain text terms. But it still doesn't explain why it will fail only for this text suggester search but for other's with similar characteristics doesn't.Ĭurl -X PUT "localhost:9200/twitter" -H 'Content-Type: application/json' -d' ![]() This term is part of the whole text fields which is indexed as the "type": "completion" - something like "Ideal kan". The issue is with only a few text terms but it works as expected for a few selected text terms("kan") search it gives .XContentParseException and resultantly IOException while trying to fetch the search response from the elastic server. I have created an index with a mapping required for the autocomplete(type as you search capabilities) amongst other used cases. I am trying to get some used cases up and running in ElasticSearch 6.4 version on my local machine. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |