Allow selecting multiple search indexes as override source

Created on 22 October 2020, about 4 years ago
Updated 27 October 2023, about 1 year ago

Problem/Motivation

Besides selecting nodes to override in search, it is now possible to select a single search index as source for overrides, as described in issue #3059864 . I have a case where I need to select multiple indexes containing different entity types so they all become available in the search overrides.

Steps to reproduce

Go to search_override settings at /admin/config/search/search_override/settings and select for "Content to select from" the option "Select from a search index". Only one index can be selected and used in the autocomplete fields when adding an override.

Proposed resolution

Allow the selection of indexes for multiple options. Pass them through the autocomplete callback as imploded values. In the callback combine all the search query results coming from the multiple indexes.

Remaining tasks

  1. Refactor the admin UI.
  2. Refactor the autocomplete callback when using indexes.

User interface changes

The admin UI should allow for multiselect search indexes.

API changes

None

Data model changes

The config setting "search_index" contains multiple values instead of 1.

PS: Also keep an extra eye on Allow multiple target entity types in the 'entity_autocomplete' Form API element 📌 Allow multiple target entity types in the 'entity_autocomplete' Form API element Needs work , this could later be used in this module.

Feature request
Status

Needs review

Version

2.0

Component

Code

Created by

🇧🇪Belgium fernly

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024