Just pushed support for a new search_type called count. This will return (and optimize) to only provide the total_hits, while still returning things like facets.
A hack to do that was to set size to 0, but with the new search type, it will be much more optimized to compute just the total_hits.
Just pushed support for a new search_type called count. This will
return (and optimize) to only provide the total_hits, while still returning
things like facets.
A hack to do that was to set size to 0, but with the new search type, it
will be much more optimized to compute just the total_hits.
There is valuable optimization compared to setting size to 0. Though, I plan to do that automatically when setting size to 0 (but still like the fact that there is a specific "type" for that).
On Thursday, February 24, 2011 at 1:28 AM, Lukáš VlÄek wrote:
How did you know I need it?
Is this only syntax sugar compared to "size":0 approach or is there any valuable optimization?
Just pushed support for a new search_type called count. This will return (and optimize) to only provide the total_hits, while still returning things like facets.
A hack to do that was to set size to 0, but with the new search type, it will be much more optimized to compute just the total_hits.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.