Hello there,
Does anyone know of a quick way to pull the data from search results that speak to what categories are matching for a certain term? I'm looking to create a way that when a user searches they see the top 9 (determined by top number of matches) or so categories with matches and a total of how many matches there are for each. I figure if I can even get a variable that speaks to the aggregate categories matching for a term I could easily code out the function to parse and arrange the results. I've heavily immersed myself in the search.module and search.pages.inc files, as well as looked over the use of the hook_search function. I can tell that do_search; seems to power the main query, but I've had some difficulty calling it with different criteria. It looks like many of the custom search module options (that I can find from searching the drupal site) seems to speak to modifications that warrant extra fields to be indexed/returned in search and I don't really need that. The data that search is returning seems more than adequate, I just need to find out how to identify the categories it's matching. Has anyone had experience building out something similar before? Is there a certain call I can use or add to the search functions that will return this data for me? Or does this require a bit of a rewrite to the search functions?
Thanks in advance for any help anyone can provide!