Now I know that the limit to the amount of records returned per page is 1000 records. My user case requires me to fetch the maximum amount of records possible for analytics purposes. Which is why I am trying to loop over the pages to reach the maximum amount of records. However I can't seem to find the option to loop over the pages anywhere in the documentation. I'm sure that is must be possible as the result always returns the amount of records and the current page, which is why I am asking how I could possibly fetch the other pages.
Thanks a lot for the quick response! However it seems that the AnalyticsQueriesParams expects an AppSearch\Schema\Page instead of a WorkplaceSearch\Schema\Page, which results in the following error:
Cannot assign Elastic\EnterpriseSearch\WorkplaceSearch\Schema\Page to property Elastic\EnterpriseSearch\AppSearch\Schema\AnalyticsQueriesParams::$page of type Elastic\EnterpriseSearch\AppSearch\Schema\Page
I've posted the code that is producing this error beneath this paragraph, maybe that will make it easier to solve.
$page = new Page(2, 10, 10, 1000);
$params = new AnalyticsQueriesParams();
$params->page = $page;
$request = new GetTopQueriesAnalytics('enginename', $params);
$result = ElasticClient::getInstance()->getAppSearch()->appSearch()->getTopQueriesAnalytics(
$request
);
$result = $result->asArray()['results'];
When I use the AppSearch\Schema\Page it works, but that class only accepts the size parameter.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.