Steps to reproduce the issue
- Install com_finder 3.0.0 and plugin "Smart Search - Content Pro" 1.0.0
- Create menu of type "Smart Search > Search", allowing empty search (rendering all results) and limit the search to a single category, e.g. "Knowhow"
- Create a content article "This is a testing article" and associate it to the category "Knowhow"
- Run indexer
- Call new search page
- Enter some fancy search term like "testasdf123" which definitely does not exist in any content
- Enter some other search term like "test" which does exist as a substring of a article title (e.g. "This is a testing article"). "test" is a part of the existing term "testing"
- Enter some search term that exists as a full word, like "testing"
Expected result
- Should return a "No Results Found" message
- Should return the "This is a testing article"
- Should return the "This is a testing article"
Actual result
- Returns ALL content items => Wrong
- Returns a "No Results Found" message as expected => Wrong
- Returns the "This is a testing article" => Correct
System information (as much as possible)
- Additionally I have plugin "Smart Search - JEM" running (for indexing), should not matter here.
- Debugging com_finder shows the following:
- In FinderModelSearch::getResultsTotal() (/components/com_finder/models/search.php, line 355) the condition "if (empty($this->includedTerms))" returns: In case 1) $this->includedTerms is empty, in case 2) $this->includedTerms contains my search term. So in case 1) a query is built which returns ALL records, in case 2) the more complicated query is built and returns an empty result as expected.
- In FinderIndexerQuery::getIncludedTermIds() (/administrator/components/com_finder/helpers/indexer/query.php, line 402) the condition "if (empty($this->included[$i]->matches))" is empty for case 1) and not empty for case 2)
Both looks weird to me...
Additional comments
can you please redo it with a clean joomla installation and report back ?