Hi,

I experienced an issue when adding a contextual filter with an OR operator.

Repeatable: Always
Steps to repeat:

  1. Edit or add a search view
  2. Add a contextual filter on a Fulltext search
    1. Parse mode: Multiple words
    2. Operator: Contains any of these words

If you have 2 contents entitled "Lorem ipsum" and "Curabitur arcu erat" and you search is "Lorem arcu".

Expected Results:
Parsed keys using the OR operator. Therefore the contents "Lorem ipsum" and "Curabitur arcu erat" have to be found.

Actual Results:
Parsed keys using the AND operator. Therefore the contents "Lorem ipsum" and "Curabitur arcu erat" are not found.

I will attach a patch to fix that.

Comments

beram created an issue. See original summary.

beram’s picture

Here is the patch.

Thanks for the review.

I am not sure if the followed line has to be removed or not :

$this->query->setOption('conjunction', $this->options['conjunction']);
slucero’s picture

I ran into the same issue and the patch in #2 solved the problem perfectly.

Grimreaper’s picture

Status: Active » Reviewed & tested by the community

Just updating the issue, I have not tested to reproduce the error and test the patch.

drunken monkey’s picture

Status: Reviewed & tested by the community » Fixed

Great job, thanks!
Committed.
(I also removed all references to the conjunction query option – that one really didn't make much sense anymore, with the new parse mode plugin system.)

  • drunken monkey committed cbd39c0 on 8.x-1.x authored by beram
    Issue #2843632 by beram, drunken monkey: Fixed "contains any" for Views...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.