Hi,
For anyone interested, we've been using the following workaround:
Instead of prepending the fq with the extra {!tag=foo} localParam, one
can directly add the tag=foo key-value pair inside the {!collapse}.
That is:
"q":"*:*",
"q.op":"AND",
"fq":"{!collapse field=id*tag=foo*}",
This works because tag registration in the constructor of QParser reads
this value explicitly
<https://github.com/apache/solr/blob/releases/solr/9.10.0/solr/core/src/java/org/apache/solr/search/QParser.java#L84>.
Best,
Markos
On 6/9/26 13:16, Mikhail Khludnev wrote:
Hi,
Never heard of it.
On Mon, Jun 8, 2026 at 6:05 PM Markos Volikas<[email protected]> wrote:
Thanks for the suggestion, Mikhail!
So, from what I understand, this is expected behavior. Are there any
plans to make it possible for such a query combination to work in the
future?
Markos
On 5/13/26 12:00, Mikhail Khludnev wrote:
Perhaps, SolrIndexSearcher.getProcessedFilter() may do a better job
detecting and handling postFilter-only filter queries.
Markos, as a workaround you may use a few queries, like with&without
filter, etc.
On Wed, May 13, 2026 at 11:17 AM Markos Volikas<[email protected]>
wrote:
Hi everyone,
I'm getting the following error (full trace attached) when combining the
collapse query parser with the AND operator + tagging:
Query CollapsingPostFilter(field=id, nullPolicy=ignore,
GroupHeadSelector(selectorText=score, type=SCORE), size=100000) does not
implement createWeight
The query parameters I've been using are:
"q":"*:*",
"q.op":"AND",
"fq":"{!tag=foo}{!collapse field=id}",
Changing the operator to OR *or* removing the tag resolves the issue.
You can reproduce by creating a collection with the default schema and
indexing some sample data for testing the collapsing. I've tested with
Solr
10 and Solr 7, and both have the same issue.
Do you know if this is expected behavior? And if so, why?
Thanks,
Markos