Affects Version/s: 6.1.1 CE GA2, 6.1.20 EE GA2
Component/s: Documents & Media
Steps to reproduce
1. upload two jpg file, named with "pic 1" and "image 1"
2. upload a png file, named with "pic 2"
3. add search portlet to a page
4. configure search portlet, and use "advanced" mode and insert the attached text into the textarea somwhere into the default code (but NOT DELETE the default code).
5. search with the keyword "image" (you should see 1 result, "image 1")
6. choose jpg as file type
7. you should see only "image 1" in result list, but because of the bug, there are two items in the list
"pic 1" (because of the extension) and "image 1" (because of the keyword search).
8. search with the keyword "jpg" and without facet-extension
9. you should see two results
Let assume, that the keyword is "pic" and the extension is "jpg".
Our query string will be this (only the appropriate part):
+extension:jpg +( title:pic ... extension:jpg)
Where the first part +extension:jpg is because of the file type selection, and the +( title:pic ... extension:jpg) part is because of the keyword search.
Which is surely wrong, because the good search string would be this:
+extension:jpg +( title:pic ... extension:pic)
We should know if the search-field is faceted or not. If faceted, than we should use keyword.