We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
To reproduce, create a mapping:
curl -XPUT "http://localhost:9200/bar/" -d' { "mappings": { "foo": { "properties": { "accounts": { "type": "nested" } } } } }'
Index an object:
curl -XPOST "http://localhost:9200/bar/foo" -d' { "accounts": [ { "amount": 1 } ] }'
And run a search:
curl -XPOST "http://localhost:9200/bar/_search" -d' { "facets": { "test": { "statistical": { "field": "accounts.amount" } } }, "size":0 }'
This is the output (note that it did find one document, but not stats on it):
{ "took": 90, "timed_out": false, "_shards": { "total": 5, "successful": 5, "failed": 0 }, "hits": { "total": 1, "max_score": 1, "hits": [] }, "facets": { "test": { "_type": "statistical", "count": 0, "total": 0, "min": "Infinity", "max": "-Infinity", "mean": 0, "sum_of_squares": 0, "variance": "NaN", "std_deviation": "NaN" } } }
The text was updated successfully, but these errors were encountered:
you forgot to specify "nested" on the facet:
curl -XPOST "http://localhost:9200/bar/_search" -d' { "facets": { "test": { "statistical": { "field": "accounts.amount" }, "nested" : "accounts" } }, "size":0 }'
Sorry, something went wrong.
@uboness thx. Indeed. For future record - this works too and conforms to the documentation (note the field option of the facet):
field
curl -XPOST "http://localhost:9200/bar/_search" -d' { "facets": { "test": { "statistical": { "field": "amount" }, "nested": "accounts" } }, "size":0 }'
No branches or pull requests
To reproduce, create a mapping:
Index an object:
And run a search:
This is the output (note that it did find one document, but not stats on it):
The text was updated successfully, but these errors were encountered: