Hello Binh

Thanks.

It's my query 

{
    "query" : {
        "bool": {
            "must": [
               {"query_string": {
                  "query": "\"(Google)[email protected]\""
               }}
            ],
            "must": [
               {"query_string": {
                  "query": "ReadingLog.ChapLog"
               }}
            ]
        }
    },
    "facets" : {
        "tag" : {
            "terms" : {
                "field" : "prdId",
                "all_terms" : true
            }
        }
    },
    "size": 0
}

But result
 "facets": {
      "tag": {
         "_type": "terms",
         "missing": 0,
         "total": 3,
         "other": 0,
         "terms": [
            {
               "term": "0100202444",
               "count": 3

Not count:1.
Maybe I lose some pattern, Do you have any suggest??

Thanks

Binh Ly於 2014年2月27日星期四UTC+8下午8時58分51秒寫道:
>
> Field collapsing is coming in a future version of ES. For now, you can use 
> a terms facet and the all_terms option:
>
> {
>     "query" : {
>         "match_all" : {  }
>     },
>     "facets" : {
>         "tag" : {
>             "terms" : {
>                 "field" : "distinctid",
>                 "all_terms" : true
>             }
>         }
>     }
> }
>
>
> And then in the result, just count the total number of entries in the 
> terms array.
>

-- 
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/e115cc35-260a-4db2-819a-ee239d1a2c6e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to