alleyinteractive / searchpress

Elasticsearch integration for WordPress.
84 stars 12 forks source link

Look into removing fake search term when forcing the search template #162

Open mboynes opened 11 months ago

mboynes commented 11 months ago

Description

See this comment which prompts this issue.

Some history: 10 years ago (exactly) when I built the integration, I believe that if the s query arg was an empty string, the query would not be considered a "search query" and WordPress wouldn't render the search template. It's certainly possible that that was an oversight on my part, I'm not sure. Regardless, it looks like that's not the case now. Perhaps instead of using a phony search term, we can get away with setting s to an empty string.

Use Case

When a user forces the search template, SP should set s to an empty string instead of a phony search term so that the search term will render without inserting a hacky meaningless string.