You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Ian Grainger <ia...@isfluent.com> on 2011/10/28 12:09:25 UTC

Solr 3.4 group.truncate does not work with facet queries

Hi, I'm using Grouping with group.truncate=true, The following simple facet
query:

facet.query=Monitor_id:[380000 TO 400000]

Doesn't give the same number as the nGroups result (with
grouping.ngroups=true) for the equivalent filter query:

fq=Monitor_id:[380000 TO 400000]

I thought they should be the same - from the Wiki page: 'group.truncate: If
true, facet counts are based on the most relevant document of each group
matching the query.'

What am I doing wrong?

If I turn off group.truncate then the counts are the same, as I'd expect -
but unfortunately I'm only interested in the grouped results.

- I have also asked this question on StackOverflow, here:
http://stackoverflow.com/questions/7905756/solr-3-4-group-truncate-does-not-work-with-facet-queries

Thanks!

-- 
Ian

ian@isfluent.com <al...@endissolutions.com>
+44 (0)1223 257903

Re: Solr 3.4 group.truncate does not work with facet queries

Posted by Ian Grainger <ia...@isfluent.com>.
Thanks, Marijn. I have logged the bug here:
https://issues.apache.org/jira/browse/SOLR-2863

Is there any chance of a workaround for this issue before the bug is fixed?

If you want to answer the question on StackOverflow:
http://stackoverflow.com/questions/7905756/solr-3-4-group-truncate-does-not-work-with-facet-queries
I'll
accept your answer.


On Fri, Oct 28, 2011 at 12:14 PM, Martijn v Groningen <
martijn.v.groningen@gmail.com> wrote:

> Hi Ian,
>
> I think this is a bug. After looking into the code the facet.query
> feature doesn't take into account the group.truncate option.
> This needs to be fixed. You can open a new issue in Jira if you want to.
>
> Martijn
>
> On 28 October 2011 12:09, Ian Grainger <ia...@isfluent.com> wrote:
> > Hi, I'm using Grouping with group.truncate=true, The following simple
> facet
> > query:
> >
> > facet.query=Monitor_id:[380000 TO 400000]
> >
> > Doesn't give the same number as the nGroups result (with
> > grouping.ngroups=true) for the equivalent filter query:
> >
> > fq=Monitor_id:[380000 TO 400000]
> >
> > I thought they should be the same - from the Wiki page: 'group.truncate:
> If
> > true, facet counts are based on the most relevant document of each group
> > matching the query.'
> >
> > What am I doing wrong?
> >
> > If I turn off group.truncate then the counts are the same, as I'd expect
> -
> > but unfortunately I'm only interested in the grouped results.
> >
> > - I have also asked this question on StackOverflow, here:
> >
> http://stackoverflow.com/questions/7905756/solr-3-4-group-truncate-does-not-work-with-facet-queries
> >
> > Thanks!
> >
> > --
> > Ian
> >
> > ian@isfluent.com <al...@endissolutions.com>
> > +44 (0)1223 257903
> >
>
>
>
> --
> Met vriendelijke groet,
>
> Martijn van Groningen
>



-- 
Ian

ian@isfluent.com <al...@endissolutions.com>
+44 (0)1223 257903

Re: Solr 3.4 group.truncate does not work with facet queries

Posted by Martijn v Groningen <ma...@gmail.com>.
Hi Ian,

I think this is a bug. After looking into the code the facet.query
feature doesn't take into account the group.truncate option.
This needs to be fixed. You can open a new issue in Jira if you want to.

Martijn

On 28 October 2011 12:09, Ian Grainger <ia...@isfluent.com> wrote:
> Hi, I'm using Grouping with group.truncate=true, The following simple facet
> query:
>
> facet.query=Monitor_id:[380000 TO 400000]
>
> Doesn't give the same number as the nGroups result (with
> grouping.ngroups=true) for the equivalent filter query:
>
> fq=Monitor_id:[380000 TO 400000]
>
> I thought they should be the same - from the Wiki page: 'group.truncate: If
> true, facet counts are based on the most relevant document of each group
> matching the query.'
>
> What am I doing wrong?
>
> If I turn off group.truncate then the counts are the same, as I'd expect -
> but unfortunately I'm only interested in the grouped results.
>
> - I have also asked this question on StackOverflow, here:
> http://stackoverflow.com/questions/7905756/solr-3-4-group-truncate-does-not-work-with-facet-queries
>
> Thanks!
>
> --
> Ian
>
> ian@isfluent.com <al...@endissolutions.com>
> +44 (0)1223 257903
>



-- 
Met vriendelijke groet,

Martijn van Groningen