Hi, Is it possible to create a query similar in function to multiple SQL group by clauses? I have documents that have a single valued fields for host name and collection name and would like to group the results by both e.g. a result would contain a count of the documents grouped by both fields:
Hostname1 collection1 456 Hostname1 collection2 567 Hostname2 collection1 123 Hostname2 collection2 789 This is on Solr 3.3 (could be on 4.x) and both fields are single valued with the type: <fieldType name="lowerCaseSort" class="solr.TextField" sortMissingLast="true" omitNorms="true"> <analyzer> <tokenizer class="solr.KeywordTokenizerFactory"/> <filter class="solr.LowerCaseFilterFactory" /> <filter class="solr.TrimFilterFactory" /> </analyzer> </fieldType> <field name="collectionName" type="lowerCaseSort" indexed="true" stored="true" multiValued="false" required="true" omitNorms="true" /> <field name="hostName" type="lowerCaseSort" indexed="true" stored="true" multiValued="false" required="true" omitNorms="true" /> Regards, Ben ------------------------------------------------------------------ Dr Ben Ryan Jorum Technical Manager 5.12 Roscoe Building The University of Manchester Oxford Road Manchester M13 9PL Tel: 0160 275 6039 E-mail: benjamin.r...@manchester.ac.uk<https://outlook.manchester.ac.uk/owa/redir.aspx?C=b28b5bdd1a91425abf8e32748c93f487&URL=mailto%3abenjamin.ryan%40manchester.ac.uk> ------------------------------------------------------------------