Problem/Motivation
A search index contains just one fulltext field, but searching the index results in the following error message: "Search keys are given but no fulltext fields are defined."
Steps to reproduce
I am using the database backend. I added the node Title field as the only field in the list of indexed fields. I also set the index type for the field to "Fulltext". When I try to search the index using a Drupal view with a Fulltext search filter, I get the following error: "Search keys are given but no fulltext fields are defined." I am getting the same result with other Text (plain) fields but not Text (formatted) fields. Am I doing something wrong?
Proposed resolution
Remaining tasks
Issue fork search_api-3511293
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
drunken monkeySeems like you might have created the view using different fulltext fields that aren’t there anymore?
Try re-saving the config form for the “Search: Fulltext search” filter in your search view and then saving the view.
Comment #3
mvnovick commentedRe-saving the “Search: Fulltext search” filter seems to work. I am not seeing the "Search keys are given but no fulltext fields are defined." error any more.
Comment #5
drunken monkeyGood to hear, thanks for reporting back.
Not 100% sure how to handle this correctly, but probably we should just search all available fields if no valid ones are selected.
Well, the proper fix would probably be to listen to search index updates and adapt all associated search views accordingly, but that’s a lot of effort for very little actual benefit, I’d say. So, created an MR for the former approach.
Comment #6
drunken monkeyPlease test/review the MR so I can merge it.
Comment #8
drunken monkeyMerged.