Does not index new boolean fields on existing content

Created on 17 May 2023, over 1 year ago
Updated 15 June 2023, over 1 year ago

Respect the submission guidelines above! Drupal.org issue forks cause additional work for the project maintainer!

Setup

  • Solr version: 7.7.3
  • Drupal Core version: 9.3.22
  • Search API version: 8.x-1.28
  • Search API Solr version: 4.2.7
  • Configured Solr Connector: Standard

Issue

  1. Create some content and index it.
  2. Add a new boolean field to the content type.
  3. Add the new boolean field to the search index, and reindex the content.
  4. None of the existing content will have this boolean field in the indexed document. Only new content or content that gets re-saved will have a value for it.
  5. This means in a view, you cannot use this new boolean field in a filter, because adding the filter will cause no content at all to appear. The only options for the filter are true and false, but most of the content has no value.

Expected results

  1. When indexing content, if a boolean field doesn't have a value on the node (i.e. it's null) then this should be indexed as false in Solr.
  2. When adding a filter to a view on a boolean field, nodes with no value for that field should be considered as not having it checked (i.e. not true).

💬 Support request
Status

Fixed

Version

4.2

Component

Code

Created by

🇬🇧United Kingdom Rob230

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024