adamfairholm / Elasticquent

Map Larvel Eloquent models to Elasticsearch types
MIT License
201 stars 38 forks source link

Model::searchByQuery() method #23

Open marciomansur opened 9 years ago

marciomansur commented 9 years ago

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 commented 9 years ago
public static function searchByQuery($query = null, $aggregations = null, $sourceFields = null, $limit = null, $offset = null, $sort = null)

so

searchByQuery($query, null, null, 666);
skryvytskyi commented 8 years ago

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

therpr commented 8 years ago

@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