-
Notifications
You must be signed in to change notification settings - Fork 730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No way to specify no limit #475
Comments
@Altreus Back in 2012 this was the actually the effect. Since then the implementation on the side of elasticsearch has changed. The option to return all results was removed (I assume for performance reason). So this is not possible anymore. |
Hmm, if I don't provide a limit when I perform a query on my instance, I get all things. Perhaps I am using an old version of elasticsearch - centos is not known for its modernism. |
Which version are you using? |
@ruflin if it's not longer possible to run a query without limit, please remove the comment here: https://github.com/ruflin/Elastica/blob/master/lib/Elastica/Query.php#L199 |
@SimonSimCity Agree, this should be removed. Can you open an issue with that so we can directly close it with a pull request? |
https://groups.google.com/forum/#!topic/elastica-php-client/NlZeSTmYWEw
This thread from 2012 implies that not providing a limit should not default to a limit of 10, but the unit tests still test for that default.
Elastica documentation barely mentions the limit, except in passing on the
search()
method, and doesn't say it defaults to 10. Nor does it say how to not create one at all.https://github.com/ruflin/Elastica/blob/master/lib/Elastica/Search.php#L474
This line implies I can provide
[ 'limit' => $x ]
tosearch()
but it complains thatlimit
is not a valid option if$x
isnull
:Using
$query->setSize(null)
also causes it to default to 10, as does0
.Is there no way to remove the limit? I feel there should be.
The text was updated successfully, but these errors were encountered: