The WebGUI search system is not working as expected when doing boolean searches using filtering ('-'). It appears to me that it is building incorrect queries. To replicate this report, perform the following search (excluding quotes):
'+news -latest'
You will receive results with the term 'latest' which is not the desired behavior. I turned on the query log on my local server and found that the query that is being built by WebGUI includes the following SQL:
(match (keywords) against ('+\"+\'\'news\"* +\"-\'\'latest\"*' in boolean mode))
This query is incorrectly including the keyword "latest" in the search results.
I modified the query as below which correctly excludes assets with the "latest" keyword:
(match (keywords) against ('-\"\'\'latest\"* +\"\'\'news\"*' in boolean mode))
I don't know what the correct query should be, but the bottom line is that the search asset currently is not working as advertised.
------ EDIT ----------
Further monkeying with the WebGUI search queries has yielded the following successful version of the above search terms (again, eliminate the single quotes from my query example):
'"news" -latest'
This gives the expected output. Here's the relevant part of the SQL query that was generated:
(match (keywords) against ('\"news\" -latest' in boolean mode))
That looks like a much more sane search than the one produced above.
------ EDIT #2 ----------
I can't seem to leave this alone. I think, though, that I've narrowed down the problem to the section of WebGUI::Search->search() which handles appending the wildcard character to the end of search terms. If you perform the search as follows, you get the desired results:
'+news* -latest'
William
----Knowmad Technologieshttp://www.knowmad.com
I'm working on this.
Yung
fixed in 7.5.19