-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Description
Elasticsearch version: 1.74
Plugins installed: []
JVM version: Found Hosting
OS version: Found Hosting
I followed https://www.elastic.co/guide/en/elasticsearch/guide/current/mixed-lang-fields.html to analyze fields multiple times. However it seems as if this feature does not work on nested documents.
I added an index with the following mapping:
{
"mappings": {
"case": {
"properties": {
"clientRelationship.policy.policyHolder.firstName": {
"type": "string",
"fields": {
"key": {
"type": "string",
"analyzer": "keyword"
}
}
},
"test": {
"type": "string",
"fields": {
"key": {
"type": "string",
"analyzer": "keyword"
}
}
},
"test2": {
"type": "string",
"analyzer": "keyword"
}
}
}
}
}
Then added a document:
{
"clientRelationship": {
"policy": {
"policyHolder": {
"firstName": "Jeff Awesome"
}
}
},
"test": "Jeff Awesome"
}
When searching
{
"query": {
"term": {
"test": "Jeff Awesome"
}
}
}
returns a document, while
{
"query": {
"term": {
"clientRelationship.policy.policyHolder.firstName.key": "Jeff Awesome"
}
}
}
does not
Metadata
Metadata
Assignees
Labels
No labels