Elasticsearch number of faces returned

I have faceted queries working with elasticsearch 0.19.9. However, I would like to return all faces that have count> 0.

In accordance with the documentation, I should be able to:

{
    "query" : {
        "match_all" : {  }
    },
    "facets" : {
        "tag" : {
            "terms" : {
                "field" : "tag",
                "all_terms" : true
            }
        }
    }

}

As I understand it, this should give me all the facets, even if count is 0.

However, this still only returns the top 10 counts. What is the default size. The only thing that apparently affects the number of faces returned is actually setting "size" : Nwhere Nis the number of facets to be returned.

I could set this to a really large number, but it just looks like hack-ish.

Any ideas on what I might be doing wrong?

+5
source share
2

. ! github, Stats facet, = 0, . , , . , , !

+4
{
    "query" : {
        "match_all" : {  }
    },
    "facets" : {
        "tag" : {
            "terms" : {
                "field" : "tag",
                "size" : 2147483647,
                "all_terms" : false
            }
        }
    }
}

"count: 0" - "all_terms" false Elasticsearch ( - , PHP ).

, . Facet ( Elasticsearch, ).

+3

All Articles