When exactly should you use the fully qualified path name in the case of
standard objects, nested objects (documents), and combinations with
multi_field within?
I had an incident where my facets were not returning correctly. I traced it
back to a nested facet filter and a field name inside that nested document
that is used elsewhere in the document. When I reindexed, it "FIXED
ITSELF." I thought, fine, I will fully qualify the path to prevent whatever
issue just happened.
However, I also applied the fully qualified path to a multi_field that is
accessed via "just_name" inside the nested document. In that case, I was
not able to put the nested document path in front of it.
====Relevant chunk of mappings for this nested object=====
{
"categories": {
"type": "nested",
"properties": {
"name": {
"type": "multi_field",
"path": "just_name",
"fields": {
"name": {
"type": "string"
},
"name_special": {
"type": "string",
}
}
},
"default": {
"type": "boolean" <== this was my problem field, I use
default in a non-nested object elsewhere in the document.
}
}
}
}
====facet=====
{
"facets": {
"hierarchy": {
"terms": {
"field": "categories.name_special" <== doesn't work, have to
use "name_special" without path
},
"facet_filter": {
"term": {
"categories.default": true <== categories. prefix must be
here to prevent another field in the "parent" doc from being used. Optional?
}
},
"nested": "categories"
}
},
"size": 0
}
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/2771c9b0-df08-4d9e-95c7-b3b2760fafb3%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.