With the code you suggested me (increasing memory limit), I manage to get over the fatal error I had before.
Now though, if I use the following filter for a template in config.php
'filter' => function($page) { return $page->isVisible() && $page->indexable()->bool(); },
the widget in the panel returns Number of indexable pages: 0
If instead I remove the indexable() check: 'filter' => function($page) { return $page->isVisible(); },
the widget correctly returns: Number of indexable pages: 8606
Whatâs $page->indexable() checking? I suppose somehow my pages donât pass whatever check its doing.
When I then hit Manual Refresh, the panel loads for few minute, until finally returns the error: Notice: Undefined index: tinyurl.enabled in /Users/Desktop/site/kirby/core/page.php on line 197
In my Algolia dashboard, my index now is made of 8606 pages, so seems that the index has been uploaded.
Itâs just an example. In this case, it would check if a checkbox field named âindexableâ is checked. But if you donât have that field, it of course doesnât work. You donât need to have it though, the filter functions can check for whatever condition you want.
This was a bug in Kirby 2.3. Have you upgraded to Kirby 2.3.1? The error should then disappear.
Thanks for the explanation about indexable()!
Updating Kirby did indeed fix the bug.
I still canât manage to get Algolia index these 8000 pages, especially if I index few fields that contain lots of text.
After a minute or so of the panel loading after I hit âmanual refreshâ it returns the error:
Hosts unreachable: Operation timed out after 30000 milliseconds with 0 bytes received,Operation timed out after 30000 milliseconds with 0 bytes received,Operation timed out after 40010 milliseconds with 0 bytes received,Operation timed out after 40000 milliseconds with 0 bytes received
Is there anywhere the plugin stores the JSON indexed file, so that I can try upload it manually into algolia?
There is now a new release of the Algolia plugin that uploads the pages in smaller batches when indexing. This should reduce the RAM usage and make the error you were having go away. Could you please try if the new version fixes it for you?