Skip to content

skip empty BooleanQuery with Occur=SHOULD#4475

Open
renatoh wants to merge 1 commit into
apache:mainfrom
renatoh:handling_empty_queries_in_FiltersQParser
Open

skip empty BooleanQuery with Occur=SHOULD#4475
renatoh wants to merge 1 commit into
apache:mainfrom
renatoh:handling_empty_queries_in_FiltersQParser

Conversation

@renatoh
Copy link
Copy Markdown
Contributor

@renatoh renatoh commented May 29, 2026

@dsmiley
This is a follow up of #4406

I realized that the minimum match expression like mm=-1 does not work properly if one should-clause is entirely removed by the analyzer, e.g. it only contains stopwords.

The root cause is that org.apache.solr.search.join.FiltersQParser#parseImpl can return empty-queries.
Given you comment on that method added quite recently, I am not sure if this is the right approach, but this change would fix the root of the issue. Alternatively I could just filter them out in the BoolQParserPlugin.

Do you know if such the empty clauses should only be filtered out if mmAutoRelax==true? If that is the case I need to do it in BoolQParserPlugin anyway.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant