Contextual filter with mutiple "AND" values generates wrong query in Search API Views

Created on 12 April 2018, about 6 years ago
Updated 21 August 2023, 11 months ago

I need to filter entites via Views with multiple field value, that match two values together, eq entity have Taxonomy Terms with id 234 and 567 together.

Via standard SQL query this is too hard task, but easy task when using Search API index for multi value field.

When I use standard filters with Search API and create filter "All of: 234,567" - Views generate right Search API query:

Conditions:
  [
    field_params = '234'
  AND
    field_params = '567'
  ]

But when I try to do same thing via Contextual Filter "234,567" or "234+567" - I always got the same "OR" result:

Conditions:
  field_params IN array (
        0 => '234',
        1 => '567',
      )

As I understand, via "234,567" argument it must generate query like in first example.

Is this a bug? If not - can anybody provide some workarounds for this problem?

πŸ› Bug report
Status

Closed: duplicate

Version

9.5

Component
ViewsΒ  β†’

Last updated about 6 hours ago

Created by

πŸ‡¦πŸ‡²Armenia Murz Yerevan, Armenia

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.69.0 2024