do_search creates temporary tables. If you call it more than one time per page request, you get errors because the temporary tables it tries to create already exist. This problem could be solved by prefixing the name of the temporary table in some way that identifies which search it belongs to (this could ostensibly be the arg(1) part of q).

The use-cases for having two searches per page are many. What if you want to offer search results for content and users at the same time, say in two columns? Or have a block that takes the $keys and does a custom search using the search index to serve contextual ads on the search page? These are the cases I'd like to see supported.

Comments

robertdouglass’s picture

Title: Allow for more than one call to do_searh per page request (prefix temporary tables) » Allow for more than one call to do_search per page request (prefix temporary tables)
Version: 6.x-dev » 5.x-dev
Category: feature » bug

This remains a 5.x exclusive issue.

jhodgdon’s picture

See also #296284: Bizarre error caused by temporary SQL tables, which I marked as a duplicate of this issue (at least, I think it is).

jhodgdon’s picture

jhodgdon’s picture

Status: Active » Closed (won't fix)

7.0 is out tomorrow, 5.x is obsolete, won't fix, sorry.