0

I have a Drupal 8 site with a custom content type called "Story". It uses the provided body field with machine name "body". Although I have set up configured Search API, it seems to only search node titles.

Here are the fields I have added under the search index: enter image description here

How can Search API be configured to search other fields, including the body field? I have tried searching words that are found only in a body field, and no search results are returned.

1

This is probably due to a misconfiguration in your search_api view. I'm assuming you're using an exposed filter and you'll need to be sure that your Keyword Search filter is configured to also search the body field. Edit the settings for the exposed filter and make sure body is selected in the Searched fields field.

It could be helpful to configure a search_index view mode for your nodes and configure search_api to index that view mode, then you can set your exposed filter to just search on that one "field". I find that it helps to keep things running smoothly and consistently across content types that don't necessarily share fields.

Also, make sure your content is actually indexed, sometimes it's just queued and hasn't actually been indexed yet. You can do that from your index's "View" tab.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.