#68667Indexed Serach: Experimental plugin produces invalid SQL-queries
Description
I use the experimental plugin of indexed_search without the mysql-driver. When I submit the searchform, an invalid SQL query gets produced:
WHERE () AND ....
The Problem can be found in IndexSearchRepository.php. In line 271 $wsel is set to an empty string. Nothing happens after this with this variable . The empty string gets then pushed into $this->wSelClauses.
In line 614 all the empty strings are put into the SQL query:
$wordSel = ‘(’ . implode(’ OR ‘, $this->wSelClauses) . ‘) AND ‘;
Because the imploded array is an empty string, the query is invalid and no results are shown in the result list, although there should be some.
When I remove this invalid part from the query, the search works just fine.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.