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 dbashford <db...@hotmail.com> on 2010/10/06 22:15:13 UTC

StatsComponent and multi-valued fields

Running 1.4.1.

I'm able to execute stats queries against multi-valued fields, but when
given a facet, the statscomponent only considers documents that have a facet
value as the last value in the field.

As an example, imagine you are running stats on "fooCount", and you want to
facet on "bar", which is multi-valued.  Two documents...

1)
fooCount = 100
bar = A, B, C

2) 
fooCount = 5
bar = C, B, A

stats.field=fooCount&stats=true&stats.facet=bar

I would expect to see stats for A, B, and C all with sums of 105.  But what
I'm seeing is stats for C and A with sums of 100 and 5 respectively.

Is this expected behavior?  Something I'm possibly doing wrong?  Is this
just not advisable?

Thanks!

-- 
View this message in context: http://lucene.472066.n3.nabble.com/StatsComponent-and-multi-valued-fields-tp1644918p1644918.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: StatsComponent and multi-valued fields

Posted by Peter Karich <pe...@yahoo.de>.
I'm not sure ... just reading it yesterday night ...
but isn't the unapplied patch from Harish
https://issues.apache.org/jira/secure/attachment/12400054/SOLR-680.patch
what you want?

Regards,
Peter.

> Running 1.4.1.
>
> I'm able to execute stats queries against multi-valued fields, but when
> given a facet, the statscomponent only considers documents that have a facet
> value as the last value in the field.
>
> As an example, imagine you are running stats on "fooCount", and you want to
> facet on "bar", which is multi-valued.  Two documents...
>
> 1)
> fooCount = 100
> bar = A, B, C
>
> 2) 
> fooCount = 5
> bar = C, B, A
>
> stats.field=fooCount&stats=true&stats.facet=bar
>
> I would expect to see stats for A, B, and C all with sums of 105.  But what
> I'm seeing is stats for C and A with sums of 100 and 5 respectively.
>
> Is this expected behavior?  Something I'm possibly doing wrong?  Is this
> just not advisable?
>
> Thanks!
>
>   


-- 
http://jetwick.com twitter search prototype


Re: StatsComponent and multi-valued fields

Posted by Chris Hostetter <ho...@fucit.org>.
: I'm able to execute stats queries against multi-valued fields, but when
: given a facet, the statscomponent only considers documents that have a facet
: value as the last value in the field.
: 
: As an example, imagine you are running stats on "fooCount", and you want to
: facet on "bar", which is multi-valued.  Two documents...

It's a known bug ... StatsComponent's "Faceted Stats" make some really 
gross assumptions about the Field...

https://issues.apache.org/jira/browse/SOLR-1782

-Hoss