Issue Bug Closed

#67843Wrong queries in indexSearchRepository

Tymoteusz Motylewski 06/30/15, 11:14 updated 10/23/17, 21:48

Description

Duplicate ‘AND’ in IndexSearchRepository.php

Line 562 and 627 both add a ‘AND’ string so the final query contains ‘AND AND’ and gets invalid.

The pi-based version of indexed search does not contain ‘AND’ in function execFinalQuery (SearchFormController.php line 1108)

There is something wrong with the implode function in statement
$wordSel = ‘(’ . implode(’ OR ‘, $this->wSelClauses) . ‘) AND ‘;
in line 614 in IndexSearchRepository.php
Implode returns double ORs (‘OR OR’). Therefore the query gets invalid.

There are only search results for the first item in defaultFreeIndexUidList.
Other items return “no result” even if there are some.

Reviews 5