You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@solr.apache.org by Markos Volikas <mv...@apache.org> on 2026/06/08 15:05:35 UTC

Re: Error when combining the collapse query parser with tagging and AND

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 <mv...@apache.org> 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
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
For additional commands, e-mail: dev-help@solr.apache.org


Re: Error when combining the collapse query parser with tagging and AND

Posted by David Smiley <ds...@apache.org>.
Right; "tag" is one of several special local-params that may co-exist with
others.  You needn't put another local-params wrapper just for "tag".
"cache" is the other that comes to mind.

On Thu, Jun 11, 2026 at 9:23 AM Markos Volikas <mv...@apache.org> wrote:

> 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<mv...@apache.org>
> 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<mv...@apache.org>
> >> 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
> >>>>
> >

Re: Error when combining the collapse query parser with tagging and AND

Posted by David Smiley <ds...@apache.org>.
Right; "tag" is one of several special local-params that may co-exist with
others.  You needn't put another local-params wrapper just for "tag".
"cache" is the other that comes to mind.

On Thu, Jun 11, 2026 at 9:23 AM Markos Volikas <mv...@apache.org> wrote:

> 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<mv...@apache.org>
> 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<mv...@apache.org>
> >> 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
> >>>>
> >

Re: Error when combining the collapse query parser with tagging and AND

Posted by Mikhail Khludnev <mk...@apache.org>.
Right. Thanks for posting the solution!

On Thu, Jun 11, 2026 at 4:24 PM Markos Volikas <mv...@apache.org> wrote:

> 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<mv...@apache.org>
> 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<mv...@apache.org>
> >> 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
> >>>>
> >



-- 
Sincerely yours
Mikhail Khludnev

Re: Error when combining the collapse query parser with tagging and AND

Posted by Mikhail Khludnev <mk...@apache.org>.
Right. Thanks for posting the solution!

On Thu, Jun 11, 2026 at 4:24 PM Markos Volikas <mv...@apache.org> wrote:

> 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<mv...@apache.org>
> 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<mv...@apache.org>
> >> 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
> >>>>
> >



-- 
Sincerely yours
Mikhail Khludnev

Re: Error when combining the collapse query parser with tagging and AND

Posted by Markos Volikas <mv...@apache.org>.
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<mv...@apache.org> 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<mv...@apache.org>
>> 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
>>>>
>

Re: Error when combining the collapse query parser with tagging and AND

Posted by Markos Volikas <mv...@apache.org>.
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<mv...@apache.org> 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<mv...@apache.org>
>> 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
>>>>
>

Re: Error when combining the collapse query parser with tagging and AND

Posted by Mikhail Khludnev <mk...@apache.org>.
Hi,
Never heard of it.

On Mon, Jun 8, 2026 at 6:05 PM Markos Volikas <mv...@apache.org> 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 <mv...@apache.org>
> 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
> >>
> >
>


-- 
Sincerely yours
Mikhail Khludnev