I have an index for a Store with a type for Items, i.e. /store/items.
among other properties, Items have a Title (analyzed text), a
Description (analyzed text), and Tags (not-analyzed text).
I want to be able to show the facets over Tags with counts, so if a
facet of the Tag "Yellow" has a count of 12, for example, then when the
user adds that Tag to the filter she will see only 12 items.
I am using a Filtered Query with Aggs, as shown below, on Elasticsearch
1.1.0 on a single node:
GET _search {
"query": {
"filtered": {
"query": {
"multi_match": {
"query": "Large Widgets"
,"fields": [ "title^3", "description" ]
}}
,"filter": {
"terms": {
"tags": [ "Colorful" ]
,"execution": "and"
}}}}
,"aggs": {"available_tags": {"terms": {"field": "tags"}}, "size": 20}
}
I have two problems:
1) no matter what value I pass for the aggs/size I get 10 aggregations.
I want to get more than 10.
2) the hits count that comes back when adding the new tag to the filter
doesn't match the doc_count that came with the aggregations, for
example, the aggregations might show a doc_count of 12 for the tag
"Yellow", but if I add "Yellow" to the filter terms so that it reads
"tags": [ "Colorful", "Yellow" ]I get 17 hits instead of the expected 12.
am I doing something wrong? is there a bug somewhere?
TIA,
Igal
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/53541AB6.4000403%40getrailo.org.
For more options, visit https://groups.google.com/d/optout.