No Code Attached Yet
avatar sternenvogel
sternenvogel
6 Jan 2022

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
    1. Enter some fancy search term like "testasdf123" which definitely does not exist in any content
    2. 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"
    3. Enter some search term that exists as a full word, like "testing"

Expected result

  1. Should return a "No Results Found" message
  2. Should return the "This is a testing article"
  3. Should return the "This is a testing article"

Actual result

  1. Returns ALL content items => Wrong
  2. Returns a "No Results Found" message as expected => Wrong
  3. 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

avatar sternenvogel sternenvogel - open - 6 Jan 2022
avatar sternenvogel sternenvogel - change - 6 Jan 2022
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 6 Jan 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 6 Jan 2022
avatar alikon
alikon - comment - 10 Jan 2022

can you please redo it with a clean joomla installation and report back ?

avatar sakiss
sakiss - comment - 21 Jan 2022

Could you please purge and re-index you content from the Smart Search back-end?

avatar sternenvogel
sternenvogel - comment - 26 Jan 2022

Thank you guys!
@sakiss - I did this several times, no difference.

@alikon - I can exactly tell now the situation that does the harm. The fatal configuration is when you combine a search filter with the option "Allow Empty Search".

How to reproduce:

  1. Set up a clean Joomla 3.10.5 installation with sample article ("Getting Started")
  2. Index content and set up a new search filter, e.g. "All Articles" with "Search by Type" set to "Articles" (or any other filter like Author, Category or Language - just check at least 1 filter criteria of any type).
  3. In "Smart Search" > "Options", set "Allow Empty Search" to "Yes"
  4. Create new menu of type "Smart Search > Search"

Now you can reproduce the issue in the front end.

avatar brianteeman
brianteeman - comment - 5 Aug 2022

Smart Search has been considerably rewritten in Joomla 4 and I can not replicate this there.

Joomla 3 is now only receiving security fixes so I guess this should be closed - perhaps with a tag known issue or something like that @zero-24

avatar sternenvogel
sternenvogel - comment - 7 Aug 2022

Sad but sounds reasonable. So I probably have to fix it myself and switch to Joomla 4 asap... Thanks for replying anyway.

avatar zero-24
zero-24 - comment - 7 Aug 2022

Closing here as mentiond above.

avatar zero-24 zero-24 - change - 7 Aug 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-08-07 20:30:45
Closed_By zero-24
avatar zero-24 zero-24 - close - 7 Aug 2022

Add a Comment

Login with GitHub to post a comment