Access search results outside pagination

Is it possible to access data from all search results to generate some statistics on a search? When we want to count the amount of items of each item type, I can now only get information on the the amount that are called by loop().

Also, we are planning to generate visualizations on search results. So if 400 items are found, how would it be possible to retrieve all dates from these search results?

Are you talking about the Item-specific search, the site-wide search, or both?

Both in the ideal case (in Omeka 2).

In the specific search we are planning a bunch of visualizations on a number of metadata fields.

For the site-wide search it would be nice to show some statistics on the results. How many files and items. Also how many of each item type, and even some more detailed metadata statistics.

Just a bump. We could still use some advice on this.

We would like to generate some more information on search results. For instance Item type / collection count.

Our users came up with the idea to show the results in tabs. One tab for each item type, or collection the item was found in. I suppose for that we would have to mess with the sql statements?

Just looking for a place to start with this.

Ah, sorry about that.

I think pretty much any of these would require additional SQL, since pulling in all the results could get pretty expensive in terms of memory, but basically re-using the same search but doing some counting or grouping to get statistics wouldn't be so bad.

All the default pagination stuff generally happens in Omeka_Controller_AbstractActionController::browseAction, that's where the search parameters get read and turned into paginated results queries and a total count query.

Is there a way to do this through making a plugin to avoid messing with the Omeka core itself?
(mainly libraries/Omeka/Controller/AbstractActionController.php right?)

There's a filter items_browse_params (or anything_browse_params). It's meant for filtering and changing the parameters, but you could use it to just get access to the parameters that were used for a particular query if you wanted, and then do another one of your own to get counts and statistics.

It's not really meant for this purpose, so the structure would probably end up a little weird.