I have around 2 million documents in my Index currently. Now I have some
pages where i have to show the statistics of the content. I just want the
total counts of the documents. But I have to use the complex filters, so
that i can count only the required documents. Mostly I'm using the "bool"
and "and" in my queries.
I think I can just send limit : 0 , to fetch the documents, and get the
total count from the "total hits", but I am not sure will it be fast or is
there any other way to just count the total documents.
On Jan 18, 12:50 am, Chetan Sharma c...@izap.in wrote:
I have around 2 million documents in my Index currently. Now I have some
pages where i have to show the statistics of the content. I just want the
total counts of the documents. But I have to use the complex filters, so
that i can count only the required documents. Mostly I'm using the "bool"
and "and" in my queries.
I think I can just send limit : 0 , to fetch the documents, and get the
total count from the "total hits", but I am not sure will it be fast or is
there any other way to just count the total documents.
On Jan 18, 12:50 am, Chetan Sharma c...@izap.in wrote:
I have around 2 million documents in my Index currently. Now I have some
pages where i have to show the statistics of the content. I just want the
total counts of the documents. But I have to use the complex filters, so
that i can count only the required documents. Mostly I'm using the "bool"
and "and" in my queries.
I think I can just send limit : 0 , to fetch the documents, and get the
total count from the "total hits", but I am not sure will it be fast or
is
there any other way to just count the total documents.
You mean search_type set to count? If so, it will be faster, since you
don't need to bring back any hits back, even if you set size to 0,
search_type set to count will be faster.
On Fri, Jan 20, 2012 at 2:53 PM, Chetan Sharma carl@izap.in wrote:
Just one more question. Will it take the same time as query and fetch the
document, or it is faster ?
On Fri, Jan 20, 2012 at 8:31 PM, Shay Banon kimchy@gmail.com wrote:
You mean search_type set to count? If so, it will be faster, since you
don't need to bring back any hits back, even if you set size to 0,
search_type set to count will be faster.
On Fri, Jan 20, 2012 at 2:53 PM, Chetan Sharma carl@izap.in wrote:
Just one more question. Will it take the same time as query and fetch the
document, or it is faster ?
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.