Hi, I figured out a better way of doing it. The following query would be a better option: q=*:*&start=2147483647&rows=0&collapse=true&collapse.field=abc&collapse.threshold=1
Thanks, Samarth On Thu, Dec 23, 2010 at 8:57 PM, samarth s <samarth.s.seksa...@gmail.com>wrote: > Hi, > > I have been using collapsing in my application. I have a requirement of > finding the no of groups matching some filter criteria. > Something like a COUNT(DISTINCT columnName). The only solution I can > currently think of is using the query: > > > q=*:*&rows=Integer.MAX_VALUE&start=0&fl=score&collapse.field=abc&collapse.threshold=1&collapse.type=normal > > I get the number of groups from 'numFound', but this seems like a bad > solution in terms of performance. Is there a cleaner way? > > Thanks, > Samarth >