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

Command icon 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

mvnovick created an issue. See original summary.

drunken monkey’s picture

Status: Active » Postponed (maintainer needs more info)

Seems 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.

mvnovick’s picture

Re-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.

drunken monkey’s picture

Status: Postponed (maintainer needs more info) » Needs review

Good 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.

drunken monkey’s picture

Please test/review the MR so I can merge it.

  • drunken monkey committed dc8c745b on 8.x-1.x
    Issue #3511293 by drunken monkey: Fixed behavior of Views fulltext...
drunken monkey’s picture

Status: Needs review » Fixed

Merged.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.