Skip to content
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

Model::searchByQuery() method #23

Open
marciomansur opened this issue Mar 19, 2015 · 3 comments
Open

Model::searchByQuery() method #23

marciomansur opened this issue Mar 19, 2015 · 3 comments

Comments

@marciomansur
Copy link

Hello,

When I use this function, the search returns only 10 records of a collection. After some hours of studying, I've read that is something to do with 'from' and 'size', it's something to do with pagination.

How can I get all records or rize the number of records (size) using elasticquent?

@therpr
Copy link

therpr commented May 12, 2015

public static function searchByQuery($query = null, $aggregations = null, $sourceFields = null, $limit = null, $offset = null, $sort = null)

so

searchByQuery($query, null, null, 666);

@skryvytskyi
Copy link

@therpr I can't understand, in the method it has limit default null, but default limit is 10 records

@therpr
Copy link

therpr commented Jun 29, 2016

@skrivitsky https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-from-size.html

size defaults to 10

it's a feature in elasticsearch itself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants