I had a search index to which I'd added the Body field from nodes.

I then changed the search index settings to restrict it to certain node types. What I didn't realize is that none of the node types that remained had the body field.

What happened is that my view broke, with the Full Text search and relevance sort order reporting as missing handlers.

This was because Drupal\search_api\Item\Field::getDataDefinition() throws a SearchApiException, which leaves the work of hook_views_data() incomplete. This was only recorded in the log -- there was no visible error message in the UI.

Comments

joachim created an issue. See original summary.

drunken monkey’s picture

Title: better handling of fields that no longer exist » Improve handling of fields that no longer exist
Component: General code » Framework
Related issues: +#2612104: Cascade properly when processors providing new properties are disabled

Interesting, we should definitely look into that. I think in general a more thorough validation of the index is needed before it is saved – e.g., #2612104: Cascade properly when processors providing new properties are disabled is a similar problem (maybe both will even be solved at once).

drunken monkey’s picture

Status: Active » Closed (duplicate)