<p dir="auto">Related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1054495" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/1029" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/1029/hovercard" href="https://github.com/elastic/elasticsearch/issues/1029">#1029</a>.</p>
<p dir="auto">It would be useful if we can get total number of unique terms for a particular facet.<br>
One use case is that we store "id" to a field. If we get number of unique terms on the field, we know how many duplicates are included in result set.</p>
<p dir="auto">Hi all,</p>
<p dir="auto">I'd like to ask for 2 features for the terms facet that sound not too difficult to implement to me:</p>
<ul dir="auto">
<li>Adding a count / total field to the result of a terms facet, that gives the number of different terms the facet returns. For the moment I ask for maxint results to be sure I have the correct number...</li>
<li>Adding something equivalent to the from / size of the query DSL. It would really help me to be able to say that I want results from 1000, with a size of 50, instead of saying I want the 1050 firsts and then have to use only the last 50 client-side.</li>
</ul>
<p dir="auto">Please tell me if this is not clear.</p>
<p dir="auto">Thanks for your great work, we really enjoy ElasticSearch here at Mozilla!</p>
<p dir="auto">Adrian</p>