Could you use two filter queries: fq=is_valid:true&fq={!collapse field=user_id}
This syntax should work fine. It first filter the results based on is_valid:true and then collapse the results. Joel Bernstein http://joelsolr.blogspot.com/ On Thu, May 26, 2016 at 10:41 AM, aanilpala <aanilp...@gmail.com> wrote: > hi there, > > I can't seem to find a way to collapse results on a filter query. For > example, imagine that I have a query with filter is_valid:true. Now, if I > want to collapse the results on another field than is_valid (i.e user_id), > neither of the following works: > > fq=is_valid:true AND {!collapse field=user_id} > fq={!collapse field=user_id}is_valid:true > > First one causes "Query does not implement createWeight" error and in the > result set of the second on, the scores are extremely high (in the > millions) > which is far bigger than the scores of the documents in the non-collapsed > version of the query. > > I am using solr6 without shards. > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/collapsing-on-a-filter-query-tp4279218.html > Sent from the Solr - User mailing list archive at Nabble.com. >