Is there a way to set the max number of hits via the Java API? I'm using
the size parameter for itemsPerPage, but I need to cap the max hits that
are returned.
sorry I cannot follow you. Using size and from parameters helps you to
define the amount of SearchHits being returned. Of what different kind of
max hits are you speaking? Can you provide an example maybe?
Is there a way to set the max number of hits via the Java API? I'm using
the size parameter for itemsPerPage, but I need to cap the max hits that
are returned.
If I do a search for "book" and there are 5000 book items in my index but I
only want user to only be able to search over the fist 2000 hundred I need
a way to cap the totalHits. This is different from the 'from' and 'size'
parameters as that is what I use for pagination, i.e. the 'from' is the
page the user is starting from, say '21' and the 'size' is the items per
page say '20'.
On Wednesday, July 10, 2013 4:54:14 PM UTC+1, Alexander Reelsen wrote:
Hey,
sorry I cannot follow you. Using size and from parameters helps you to
define the amount of SearchHits being returned. Of what different kind of
max hits are you speaking? Can you provide an example maybe?
--Alex
On Wed, Jul 10, 2013 at 4:57 PM, dan <dan.t...@gmail.com <javascript:>>wrote:
Is there a way to set the max number of hits via the Java API? I'm using
the size parameter for itemsPerPage, but I need to cap the max hits that
are returned.
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.
If I do a search for "book" and there are 5000 book items in my index but I
only want user to only be able to search over the fist 2000 I need a way to
cap the 'totalHits'. This is different from the 'from' and 'size'
parameters as that is what I use for pagination, i.e. the 'from' is the
page the user is starting from, say '21' and the 'size' is the items per
page say '20'.
On Wednesday, July 10, 2013 4:54:14 PM UTC+1, Alexander Reelsen wrote:
Hey,
sorry I cannot follow you. Using size and from parameters helps you to
define the amount of SearchHits being returned. Of what different kind of
max hits are you speaking? Can you provide an example maybe?
--Alex
On Wed, Jul 10, 2013 at 4:57 PM, dan <dan.t...@gmail.com <javascript:>>wrote:
Is there a way to set the max number of hits via the Java API? I'm using
the size parameter for itemsPerPage, but I need to cap the max hits that
are returned.
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.
this is an application issue and should be solved there as well. Simply
exchange the values from the JSON response if you need to and do not allow
to page that far (which should be easy as this is user input).
There is now way to tell elasticsearch to hide found hits... (doesnt make
sense for a search engine to hide results which are clearly hits).
If I do a search for "book" and there are 5000 book items in my index but
I only want user to only be able to search over the fist 2000 I need a way
to cap the 'totalHits'. This is different from the 'from' and 'size'
parameters as that is what I use for pagination, i.e. the 'from' is the
page the user is starting from, say '21' and the 'size' is the items per
page say '20'.
On Wednesday, July 10, 2013 4:54:14 PM UTC+1, Alexander Reelsen wrote:
Hey,
sorry I cannot follow you. Using size and from parameters helps you to
define the amount of SearchHits being returned. Of what different kind of
max hits are you speaking? Can you provide an example maybe?
Is there a way to set the max number of hits via the Java API? I'm using
the size parameter for itemsPerPage, but I need to cap the max hits that
are returned.
--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearc...@**googlegroups.com.
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.