cakephp / elastic-search

Elastic search datasource for CakePHP
Other
88 stars 53 forks source link

Problems when searching all with where clause #100

Closed samuelrs closed 8 years ago

samuelrs commented 8 years ago

Hello, I have a function where I need to return all the items, using a where clause ,

$return = $this->Mapas->find()->where([
            'estado_id' => $estadoId,
            'municipio_id' => $municipioId,
        ]);

problem, The function is returning only 10 items , instead of the 46 I need. how to proceed?

It will be some sort of problems with the paginate or something? Note: I do not need paginate. NOTE: If I add for example the limit , (->limit(1000)) , he is returning the 46 items correctly. thank you so much

markstory commented 8 years ago

Elastic search returns only 10 results by default. If you want all the results, you'll have to set the limit yourself.