Hello,
I found a problem with exposed filter form while using Search API Solr.
I have a form that have three text fields:
- keyword search (fulltext search field)
- Author name (text field that filters on Author's name field)
- Title (text field that filters on Title field)
By using these fields, search produces incorrect results. If I search by title or author's name, search returns correct results only when author name / title consist of one word, if values are longer than one word, search returns zero results, which is not correct. Looks like a problem with text field filter.
I tried to solve this problem by replacing Author name and Title text filters with Fulltext search fields and search returns correct results when I search on author name / title that's longer than one word (and I even thought I solved the problem). BUT the search works only until I use one text field. If I enter data into Author name and Title fields at the same time, search won't return any results. That means that exposed filters doesn't work correct when there are more than one fulltext search field used.
How this can be solved?
Comments
Comment #1
drunken monkeyIn short: not at all, sorry. When you want proper fulltext functionality (including splitting of the query into separate words), you have to use the "Search: Fulltext search" filter, and you can't have two with different fields selected on the same view. That's just a technical restriction we have to live with for now.
However, seeing as this really should be possible, I have added it to the "wishlist" for Drupal 8: #2044393-5: Changes in search query functionality. So hopefully it will at least be possible there.
Comment #2
drunken monkeyComment #3
jeffschulerDo I understand properly that there's no way to search on multiple fulltext fields (via exposed filters) concurrently?
It looks from the issue you referenced (#2044393: Changes in search query functionality) that this capability was added to the D8 version?
Would you support porting to D7?
Thanks!
Comment #4
drunken monkeyHave you tried whether it currently works?
Which server backend are you using?
Comment #5
jeffschulerThanks @drunken monkey. The issue was due to misconfiguration.