stats.facet with multi-valued field in Solr 4.9
Hi! I am storing aggregated article click statistics for a website in a Lucene database. Website "articles" (i.e., pages in this case) can have multiple associated financial instruments, which – for statistics reasons – I also copy to Lucene. So basically this data is stored (and regularly updated) "by articleId and date" as { articleId: 1234, date: "2014-07-21", clicks: 5, instrumentIds: [ 1, 2, 3, 4 ] } Now I need to generate statistics, like "aggregated article click count by instrumentId": /solr/article_stats/select ?q=*:* &stats=true &stats.field=clicks &stats.facet=instrumentIds &rows=0 This way Solr returned a (large) list of instrumentIds in stats.stats_fields.clicks.facets.instrumentIds with the clicks per instrument, which was exactly what I want. After the upgrade to Solr 4.9 (from 3.6) this seems not to be possible anymore: "Stats can only facet on single-valued fields, not: instrumentIds" Is there a way to replicate the old behaviour? Thanks, Nico signature.asc Description: Message signed with OpenPGP using GPGMail
Re: stats.facet with multi-valued field in Solr 4.9
Yonik, thanks for your reply! I also found https://issues.apache.org/jira/browse/SOLR-1782 which also sees to deal with this, but I did not find out wether there is a workaround. For our use case the previous behaviour was ok and seemed (!) to be consistent. However I understand that this feature had to be disabled if it was broken. Do you have an idea how to achieve the behaviour I mentioned before? Nico On 21 Jul 2014, at 13:26, Yonik Seeley wrote: > On Mon, Jul 21, 2014 at 7:09 AM, Nico Kaiser wrote: >> After the upgrade to Solr 4.9 (from 3.6) this seems not to be possible >> anymore: >> >> "Stats can only facet on single-valued fields, not: instrumentIds" > > https://issues.apache.org/jira/browse/SOLR-3642 > > It looks like perhaps it never did work correctly. > > -Yonik > http://heliosearch.org - native code faceting, facet functions, > sub-facets, off-heap data signature.asc Description: Message signed with OpenPGP using GPGMail