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 Per Steffensen <st...@designware.dk> on 2013/08/28 15:27:01 UTC

Group/distinct

Hi

I have a set of collections containing documents with the fields: "a", 
"b" and "timestamp"
A LOT of documents and a lot of them have same values for "a", and for 
each value of "a" there is only a very limited set of distinct values in 
the "b"'s. The "timestamp"-values are different for (almost) all documents.

Can I make a group/distinct query to Solr returning all distinct values 
of "a" where "timestamp" is within a certain period of time. If yes, 
how? Guess this is just using group of facet, but what is the difference 
and which one is best? Do any of them require that the fields has been 
"prepared" for grouping/faceting by setting it up in the schema?

Can I make a query to Solr returning all distinct values of "a" where 
"timestamp" is within a certain period of time, and also, for each 
distinct "a", have the limited set of distinct "b"-values returned? I 
guess this will beg grouping/faceting on multiple fields, but can you do 
that? Other suggestions on how to achieve this?

Regards, Per Steffensen