Combined Fields Filter to search in combined fields simultaneously

Created on 8 June 2021, over 3 years ago
Updated 2 April 2023, over 1 year ago

Problem/Motivation

\Drupal\views\Plugin\views\filter\Combine::query uses triple space as separator to prevent search results on combination of multiple fields.
However this effect could be desirable in certain situations.

Steps to reproduce

Create a node with fields like: "first name" & "last name".
Use combine filter to search for both first and last name.
Search on full name will only give results when placing 3 spaces between first and last name.

Proposed resolution

Allow user to prevent the use of these extra separators.

In attached patch i have used a query_tag to get around this, but this could also be a new field.
When using this patch beware that filter order is relevant.

✨ Feature request
Status

Active

Version

9.5

Component
ViewsΒ  β†’

Last updated about 4 hours ago

Created by

πŸ‡³πŸ‡±Netherlands willempje2

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.

  • πŸ‡ΊπŸ‡¦Ukraine chmez πŸ‡ΊπŸ‡¦ Lviv

    In my case (filtering by a link where the link is building based on a few fields), the current implementation does not work, so I've made the first parameter of the "CONCAT_WS" function manageable by the query tag as well.

Production build 0.71.5 2024