Problem/Motivation
When fields are added to the search index, text fields are detected by checking whether the field item class extends StringItemBase or TextItemBase. ListStringItem (the list_string field type) extends neither, so these fields are not treated as text fields and are left out of fulltext search.
The stored values of list_string fields are plain strings, and site builders often expect them to be searchable, for example a "Category" or "Type" select list. Searching for one of these values currently returns no results.
Steps to reproduce
- Add a List (text) field to a content type, e.g.
field_categorywith allowed valuesnews|Newsandevent|Event. - Create a node and select a value for the field.
- Index the content.
- Search for the selected value (e.g.
news). - The node is not returned, and the field is not indexed as a fulltext field.
Proposed resolution
Include ListStringItem and its subclasses in the text field check.
Issue fork yaml_bundles-3625786
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 #6
seanb