Question

I am using SearchAPI on a website with 20,000 entities indexed. Searching through them with SearchAPI is pretty simple. Its fast. I want to keep it as fast as possible with very low overhead, without using Views.

I've created the appropriate code needed to create a form, blocks, and a page callback via a custom module. What I would like to do is have someone use a custom search form, hit submit, and be sent to the search results page callback.

What is the best way to store and read from form values in a page callback? Is there any way to have values persist outside of $_SESSION? Or is that the best method? If I wrote a method in my search class that inspected $_POST and did proper validation on it, would it be better to use that to keep executing a search based on that?

I already have paging methods worked out in the code, but kind of scratched my head on how to execute a form, then when using a pager, keep those values for querying the next set. I think I am close, but wanted some input if there is a way I am not seeing.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with drupal.stackexchange
scroll top