Apologies - I meant the other way around. Use them in your index
analyzers, but use your ascii_std analyzer for search analyzers.
Thanks, Clint. That's working a lot better. However, I've noticed that I
can't combine certain fields in the same text query. It seems to be related
to nested fields. Any idea why that might be?
For example, ES accepts this:
curl -X GET -s
"http://localhost:9200/development_products/product/_search?pretty=true" -d
'{ query: { text: { "items.name": "optimus", "catalog.name": "optimus" } }
}'
But adding the "name" field to the beginning or end:
curl -X GET -s
"http://localhost:9200/development_products/product/_search?pretty=true" -d
'{ query: { text: { "items.name": "optimus", "catalog.name": "optimus",
"name": "optimus" } } }'
generates an error:
{
"error" : "SearchPhaseExecutionException[Failed to execute phase [query],
total failure; shardFailures
{[V6gkYzvcSg6Gx-Ad9-hbOg][development_products][0]:
SearchParseException[[development_products][0]:
query[items.name:optimus],from[-1],size[-1]: Parse Failure [Failed to parse
source [{ query: { text: { "items.name": "optimus", "catalog.name":
"optimus", "name": "optimus" } } }]]]; nested:
SearchParseException[[development_products][0]:
query[items.name:optimus],from[-1],size[-1]: Parse Failure [No parser for
element [name]]]; }{[V6gkYzvcSg6Gx-Ad9-hbOg][development_products][2]:
SearchParseException[[development_products][2]:
query[items.name:optimus],from[-1],size[-1]: Parse Failure [Failed to parse
source [{ query: { text: { "items.name": "optimus", "catalog.name":
"optimus", "name": "optimus" } } }]]]; nested:
SearchParseException[[development_products][2]:
query[items.name:optimus],from[-1],size[-1]: Parse Failure [No parser for
element [name]]]; }{[V6gkYzvcSg6Gx-Ad9-hbOg][development_products][1]:
SearchParseException[[development_products][1]:
query[items.name:optimus],from[-1],size[-1]: Parse Failure [Failed to parse
source [{ query: { text: { "items.name": "optimus", "catalog.name":
"optimus", "name": "optimus" } } }]]]; nested:
SearchParseException[[development_products][1]:
query[items.name:optimus],from[-1],size[-1]: Parse Failure [No parser for
element [name]]]; }{[V6gkYzvcSg6Gx-Ad9-hbOg][development_products][3]:
SearchParseException[[development_products][3]:
query[items.name:optimus],from[-1],size[-1]: Parse Failure [Failed to parse
source [{ query: { text: { "items.name": "optimus", "catalog.name":
"optimus", "name": "optimus" } } }]]]; nested:
SearchParseException[[development_products][3]:
query[items.name:optimus],from[-1],size[-1]: Parse Failure [No parser for
element [name]]]; }{[V6gkYzvcSg6Gx-Ad9-hbOg][development_products][4]:
SearchParseException[[development_products][4]:
query[items.name:optimus],from[-1],size[-1]: Parse Failure [Failed to parse
source [{ query: { text: { "items.name": "optimus", "catalog.name":
"optimus", "name": "optimus" } } }]]]; nested:
SearchParseException[[development_products][4]:
query[items.name:optimus],from[-1],size[-1]: Parse Failure [No parser for
element [name]]]; }]",
"status" : 500
}