lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Šmid <>
Subject Aggregating data with Solr, getting group stats
Date Mon, 15 Jul 2013 14:52:14 GMT

  I see there are few ways in Solr which can "almost" be used for my use
case, but all of them appear to fall short eventually.

  Here is what I am trying to do: consider the following document structure
(there are many more fields in play, but this is enough for example):


  Based on user parameters (search string, some filters), I would fetch a
set of documents. What I need is to group resulting documents by different
attribute combinations (say "Manufacturer + Color" or "ProductType + Color
+ Size" or ...) and get stats (Max Price, Avg Price, Num of available
items) for those groups.

  Possible solutions in Solr:

1) StatsComponent - provides all stats I would need, but its grouping
functionality is basic - it can group on a single field (stats.field +
stats.facet) while I need field combinations. There is an issue which tried to deal with
that, but it looks like it got stuck in the past.

2) Pivot Faceting - seems like it would provide all the grouping logic I
need and in combination with"Percentiles for
facets, pivot facets, and distributed pivot facets" would
bring percentiles and averages. However, I would still miss things like
Max/Min/Sum and the issue is not committed yet anyway. I would also depend
on another yet to be committed issue for distributed support.

3) Configurable Collectors - seems promissing, but
it allows grouping by just one field and, probably
a bigger problem, seem it was just a POC and will need overhauling before
it is anywhere near being ready for commit

  Are there any other options I missed?



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message