Hello.
Playing around with a faceted search plugin (based on https://github.com/AR2L/omeka-facets-plugin), I’ve got a problem with how to correctly reference to Items already filtered by the search (ideally facets should adapt to already existing parameters, ignoring not present values).
The approach of the original developers was to retrieve a list of Items’ ID and to add that to the facets query (not sure it’s the best way: if the Items number is very big, issues could raise; maybe a different approach, where a subquery is used, could be better in the long run… this triggers another question: is there an easy way to get/create a SQL string from the Advanced Search parameters?), by using
$allItems = get_db()->getTable('Item')->findAll();
foreach (loop('items') as $item) {
$itemsArray[] = $item->id;
}
As a result, they would see all Items available in the database.
If I tried, instead,
foreach (loop('items') as $item) {
$itemsArray[] = $item->id;
}
I would obtain only the Items shown in a particular paginated page. So, if my search would find 42 Items, but pagination is set to 10, I would only get 10 results.
Is there a way to get all and just the search resulting Items, without pagination to break them down in smaller chunks (so, in the aforementioned example, 42 Items)?
Thanks.