Searching the image gallery - limit to number of search terms?

lornawebber
@lornawebber
7 years ago
334 posts
A few weeks ago I did a search of our image gallery for all images with any of the following words...
fire fires fireplace flames burning embers
I copied the resulting link to add to a discussion comment.
https://pmp-art.com/gallery/ss=fire%20fires%20fireplace%20flames%20burning%20embers

I have just tried that search again, and it shows ALL images in the image gallery, so I assume that none of the search terms were applied. Searching for just 'fire fires fireplace flames burning' works correctly.

Is there a limit of 5 on the number of search terms and if so, shouldn't there be a warning message, rather than no action?
Thanks.
updated by @lornawebber: 04/20/17 07:38:54AM
brian
@brian
7 years ago
10,148 posts
This is due to a recent change in the search module to switch to a "natural language" search if there are more than 5 words in the search string. So the issue here is that the search you are trying to run is:

Quote:
fire OR fires OR fireplace OR flames OR burning OR embers

which will get you the results you previously had. The problem we were running into was that searches like:

Quote:
picture of a dog next to a fireplace

were ending up being run as:

picture OR dog OR next OR fireplace

(the short "stop" words are not part of the search)

This ended up with mostly irrelevant search results. We felt 5 or MORE search words was a good separation between a Boolean search (which is what you want) and a natural language search - our hope was to NOT have to make another config option, which invariably ends up confusing people. But it sounds like on your site the expectation is that it will always be Boolean search? Do you want to always force ALL searches to be Boolean? Maybe the best option here is to add a config option to enable/disable natural language searches.

Let me know if that helps.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
lornawebber
@lornawebber
7 years ago
334 posts
Thanks for that explanation @Brian. I knew something had changed, just didn't know what. I will amend our documentation so our users are aware, but I'll ask Roy if he would like the option to enable/disable natural language searches and let you know.
Many thanks.

Tags