0

I am having a hard time trying to use MatchAll in elastic search using elastica, currently I have the following querystring:

$pictureQuery = new \Elastica\Query\QueryString();
        $pictureQuery->setParam('query', $searchquery);
        $pictureQuery->setParam('fields', array(
            'caption'
        ));

        $items = $itemFinder->find($pictureQuery);

the issue with this query is that it only returns 10 results. I wanted to return all results, in this case MatchAll. I am however having issues on how to get all matching results, how do I do so?

rene
  • 41,474
  • 78
  • 114
  • 152
adit
  • 32,574
  • 72
  • 229
  • 373

1 Answers1

0

Elasticsearch returns by default the top 10 results (the more relevant). That's the expected behavior.

Elasticsearch allows to change page size (size) and change page (from). Have a look at From/Size API.

In Elastica, I guess it's here: http://elastica.io/api/classes/Elastica.Query.html#method_setSize

dadoonet
  • 14,109
  • 3
  • 42
  • 49