Hi Martijn, I am not sending the collapse parameters for the second query. Here are the queries I am using:
*When using field collapsing (searching over all categories):* spellcheck=true&collapse.info.doc=true&facet=true&collapse.threshold=3&facet.mincount=1&spellcheck.q=weight+loss&collapse.facet=before&wt=xml&f.content.hl.snippets=2&hl=true&version=2.2&rows=20&collapse.field=ctype&fl=id,sid,title,image,ctype,score&start=0&q=weight+loss&collapse.info.count=false&facet.field=ctype&qt=contentsearch categories is represented as the field "ctype" above. *Without using field collapsing:* spellcheck=true&facet=true&facet.mincount=1&spellcheck.q=weight+loss&wt=xml&hl=true&rows=10&version=2.2&fl=id,sid,title,image,ctype,score&start=0&q=weight+loss&facet.field=ctype&qt=contentsearch I append "&fq=ctype:1" to the above queries when trying to get results for a particular category. -- Thanks Varun Gupta On Thu, Dec 10, 2009 at 5:58 PM, Martijn v Groningen < martijn.is.h...@gmail.com> wrote: > Hi Varun, > > Can you send the whole requests (with params), that you send to Solr > for both queries? > In your situation the collapse parameters only have to be used for the > first query and not the second query. > > Martijn > > 2009/12/10 Varun Gupta <varun.vgu...@gmail.com>: > > Hi, > > > > I have documents under 6 different categories. While searching, I want to > > show 3 documents from each category along with a link to see all the > > documents under a single category. I decided to use field collapsing so > that > > I don't have to make 6 queries (one for each category). Currently I am > using > > the field collapsing patch uploaded on 29th Nov. > > > > Now, the results that are coming after using field collapsing are not > > matching the results for a single category. For example, for category C1, > I > > am getting results R1, R2 and R3 using field collapsing, but after I see > > results only from the category C1 (without using field collapsing) these > > results are nowhere in the first 10 results. > > > > Am I doing something wrong or using the field collapsing for the wrong > > feature? > > > > I am using the following field collapsing parameters while querying: > > collapse.field=category > > collapse.facet=before > > collapse.threshold=3 > > > > -- > > Thanks > > Varun Gupta > > > > > > -- > Met vriendelijke groet, > > Martijn van Groningen >