Skip to content

search term without a matching bloom table is ignored in multi-term OR search #306

@elliVM

Description

@elliVM

Describe the bug
When bloom is enabled currently a multi-term searches uses an OR combination and one of the search terms does not match any bloom filter table, that term is completely ignored in the resulting condition.

term1 OR term2 would result in a bloom condition: (bloommatch(term1, patternTable) or patternTable.filter is null when there is no condition generated for the term2.

This can lead to unexpected search results, because the missing-term is not evaluated at all.

Expected behavior

  • All search terms should be represented in the final condition

How to reproduce
create a query using OR where one of the search terms matches with a filter pattern and the other one does not.

Software version
4.3.0

Additional context

  • using always true condition for the second term would lose all the performance gain

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingreviewIssues or pull requests waiting for a review

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions