Hello.
I have the following mapping (Elasticsearch 5.4.0):
{
"relatedData": {
"properties": {
"subject": {
"type": "nested",
"properties": {
"person": {
"properties": {
"firstName": {
"type": "keyword",
"fields": {
"english": {
"type": "text",
"analyzer": "english"
}
}
}
}
},
"relation": {
"type": "keyword",
"fields": {
"english": {
"type": "text",
"analyzer": "english"
}
}
}
}
}
}
}
}
I get the the result for fulltext search using analysed field .english and nested path = it is fine.
But I have problems with wildcard for nested non-analyzed field:
"bool": {
"must": [
{
"nested": {
"query": {
"wildcard": {
"relatedData.subject.relation": {
"query": "author",
"operator": "OR",
"prefix_length": 0,
"max_expansions": 50,
"fuzzy_transpositions": true,
"lenient": false,
"zero_terms_query": "NONE",
"boost": 1
}
}
},
"path": "relatedData.subject",
"ignore_unmapped": false,
"score_mode": "none",
"boost": 1
}
}
],
"disable_coord": false,
"adjust_pure_negative": true,
"boost": 1
}
}
Here I get a response:
{
"error": {
"root_cause": [
{
"type": "parsing_exception",
"reason": "[wildcard] query does not support [query]",
"line": 276,
"col": 53
}
],
"type": "parsing_exception",
"reason": "[wildcard] query does not support [query]",
"line": 276,
"col": 53
},
"status": 400
}
Could you explain how to build wildcard query for this example?
P.S. My mapping is more complex but I put here it's simple version.