You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is nothing GeoLocation specific about the context place_type. I think there must be an issue with the java client you are using, and it is presumably trying to deduce more information from the name of the context. Perhaps the word place is being used to deduce a location? I think this issue should be moved to the java client repository because it does not appear to be an issue with elasticsearch.
Hello, thanks for the report! So, creating the mapping with the category context seems to work fine when creating the request using the java client builders:
esClient.indices().create(c ->c
.index("test-category")
.mappings(m -> m
.properties("suggest", p -> p
.completion(co -> co
.contexts(cx -> cx
.type("category")
.name("place_type"))))));
But we might have problems with the json serialization, we'll investigate this!
Elasticsearch Version
8.9.1
Installed Plugins
No response
Java Version
20.0.2
OS Version
5.15.0-83-generic elastic/elasticsearch#92-Ubuntu SMP Mon Aug 14 09:30:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Problem Description
Using Java client:
Index is created following this example: https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-suggesters.html#context-suggester
category
context is deserialized asgeo
Steps to Reproduce
Step 1: mappings
Step 2: index creation
Step 3: query
I expected https://javadoc.io/static/co.elastic.clients/elasticsearch-java/8.0.0/co/elastic/clients/elasticsearch/core/search/Context.Kind.html#Category, however the instance is of Location type
Logs (if relevant)
No response
The text was updated successfully, but these errors were encountered: