Supported queries

Search result pagination

As mentioned above, search result hit objects use lazy loading for stored document fields. When any stored field is accessed, the complete document is loaded.

Do not retrieve all documents if you actually need to work only with some portion of them. Go through the search results and store document IDs (and optionally the score) somewhere to retrive documents from the index during the next script execution.

Example #1 Search result pagination example

  1. span style="color: #ff0000;">'id']    = $hit->id;
  2.         $resultSetEntry['score''id'    => $resultSet[$resultId]['id'],
  3.         'score' => $resultSet[$resultId]['score'],
  4.         'doc''id']),
  5.     );
  6. }

Supported queries