Problem with faceted query on nested objects showing all terms "missing"

Here is a screenshot of a query and the results I'm seeing:

It is exceptionally frustrating because it worked for one of the
values once, but not the other. I restarted ES to see if it was a
glitch, then it was not working for either. No config changes,
nothing other than a shutdown and restart of ES.

I created the following mapping template and validated that every
wildcarded entry properly shows as type: nested and include_in_root:

curl -XPUT 'http://localhost:9200/telemetry-test/data/_mapping' -d '
{
"data" : {
"dynamic_templates" : [
{
"values_template": {
"path_match": "histograms.*.values",
"mapping": {
"include_in_root": true,
"type": "nested"
}
}
}
]
}
}
'

Daniel, try and use the full nested path for the fields you specify in the
facets. Note, if you specify include_in_parent, those facets will require
considerable amount of extra memory, so, try and see if you really need
it...

On Wed, Aug 17, 2011 at 4:52 AM, Daniel E deinspanjer@gmail.com wrote:

Here is a screenshot of a query and the results I'm seeing:
http://screencast.com/t/TsgnJUQuVm

It is exceptionally frustrating because it worked for one of the
values once, but not the other. I restarted ES to see if it was a
glitch, then it was not working for either. No config changes,
nothing other than a shutdown and restart of ES.

I created the following mapping template and validated that every
wildcarded entry properly shows as type: nested and include_in_root:

curl -XPUT 'http://localhost:9200/telemetry-test/data/_mapping' -d '
{
"data" : {
"dynamic_templates" : [
{
"values_template": {
"path_match": "histograms.*.values",
"mapping": {
"include_in_root": true,
"type": "nested"
}
}
}
]
}
}
'

Yes. I was not specifying the full path for key_field and
value_field. That made it work.

Now that I have at least one working case, I'll go back and try again
without include_in_parent. that was just a wild stab at getting it to
work.

Question regarding performance (assuming that they are not included
in parent/root):
If I have hundreds of thousands or even millions of root documents,
and dozens of this histogram objects, each with tens of nested
"values" objects, I will end up with a technical document count in the
billions because nested objects are indexed as extra documents. Will
I suffer in terms of scale in this case or are these nested object
documents efficient enough that I don't have to worry about having
billions when I only have hundreds of thousands of parent docs?

On Aug 16, 6:55 pm, Shay Banon kim...@gmail.com wrote:

Daniel, try and use the full nested path for the fields you specify in the
facets. Note, if you specify include_in_parent, those facets will require
considerable amount of extra memory, so, try and see if you really need
it...

On Wed, Aug 17, 2011 at 4:52 AM, Daniel E deinspan...@gmail.com wrote:

Here is a screenshot of a query and the results I'm seeing:
http://screencast.com/t/TsgnJUQuVm

It is exceptionally frustrating because it worked for one of the
values once, but not the other. I restarted ES to see if it was a
glitch, then it was not working for either. No config changes,
nothing other than a shutdown and restart of ES.

I created the following mapping template and validated that every
wildcarded entry properly shows as type: nested and include_in_root:

curl -XPUT 'http://localhost:9200/telemetry-test/data/_mapping'-d '
{
"data" : {
"dynamic_templates" : [
{
"values_template": {
"path_match": "histograms.*.values",
"mapping": {
"include_in_root": true,
"type": "nested"
}
}
}
]
}
}
'

Well, you will need to test it out :slight_smile: (and scale if perf is not good
enough). In general, those facet values are loaded to memory, and
computation is pretty fast, so, we make a lot of effort to make it as fast
as possible...

On Wed, Aug 17, 2011 at 4:59 AM, Daniel E deinspanjer@gmail.com wrote:

Yes. I was not specifying the full path for key_field and
value_field. That made it work.

Now that I have at least one working case, I'll go back and try again
without include_in_parent. that was just a wild stab at getting it to
work.

Question regarding performance (assuming that they are not included
in parent/root):
If I have hundreds of thousands or even millions of root documents,
and dozens of this histogram objects, each with tens of nested
"values" objects, I will end up with a technical document count in the
billions because nested objects are indexed as extra documents. Will
I suffer in terms of scale in this case or are these nested object
documents efficient enough that I don't have to worry about having
billions when I only have hundreds of thousands of parent docs?

On Aug 16, 6:55 pm, Shay Banon kim...@gmail.com wrote:

Daniel, try and use the full nested path for the fields you specify in
the
facets. Note, if you specify include_in_parent, those facets will require
considerable amount of extra memory, so, try and see if you really need
it...

On Wed, Aug 17, 2011 at 4:52 AM, Daniel E deinspan...@gmail.com wrote:

Here is a screenshot of a query and the results I'm seeing:
http://screencast.com/t/TsgnJUQuVm

It is exceptionally frustrating because it worked for one of the
values once, but not the other. I restarted ES to see if it was a
glitch, then it was not working for either. No config changes,
nothing other than a shutdown and restart of ES.

I created the following mapping template and validated that every
wildcarded entry properly shows as type: nested and include_in_root:

curl -XPUT 'http://localhost:9200/telemetry-test/data/_mapping'-d '
{
"data" : {
"dynamic_templates" : [
{
"values_template": {
"path_match": "histograms.*.values",
"mapping": {
"include_in_root": true,
"type": "nested"
}
}
}
]
}
}
'

Will definitely be testing it. Just a bit scary to go from 1 million docs to 5 billion just by setting type:nested. :slight_smile:

Daniel,
I am facing a similar situation. I am wondering if you learned something
from your experience. If you can share any interesting bits found, then it
would really help. thanks!
Vinay

On Tuesday, August 16, 2011 7:46:22 PM UTC-7, Daniel E wrote:

Will definitely be testing it. Just a bit scary to go from 1 million docs
to 5 billion just by setting type:nested. :slight_smile:

--