Auto-tools/Projects/OrangeFactor/ElasticSearch: Difference between revisions

Line 73: Line 73:
=== Getting a count for a query ===
=== Getting a count for a query ===


To get a count of items that will be returned by a query, you issue the query to a url that has <code>_count</code> in place of _search, and omits the "query" element which wraps the query (the "query" is implied for _count).
To get a count of items that will be returned by a query, you issue the query to a url that has <code>_count</code> in place of <code>_search</code>, and omits the "query" element which wraps the query (the "query" is implied for <code>_count</code>).


For example, the query to retrieve the first 10 records for all the bugs in mozilla-central looks like this:
For example, the query to retrieve the first 10 records for all the bugs in mozilla-central looks like this:
Confirmed users
1,905

edits