The standard way of handling this kind of thing is with filter queries. For multi-select, you have to put in some javascript or something to make an OR clause when they check the boxes.
So your query looks like fq=categoryID:(1 OR 2 OR 3) rather than fq=categoryID:1&fq=categoryID:2&fq=categoryID:3 Best, Erick On Wed, Dec 4, 2013 at 4:36 AM, kumar <pavan2...@gmail.com> wrote: > Hi, > > I indexed data into solr by using 5 categories. Each category is > differentiated by categoryId. Now i have a situation that i need to show > the > results based on facets. > > Ex: > > []-category1 > []-category2 > []-category3 > []-category4 > []-category5 > > > If the user checks the category1 it has to show the results based on > categoryId-1 > > If the user checks 2 categories it has to show the results from two > categories which the user checked > > If the user checks 3 categories it has to show the results from three > categories > > and son on.....like how many categories user checked i have to show results > from checked categories > > My Schema is in the following way...... > > <field name="id" type="string" indexed="true" stored="true" required="true" > multiValued="false" /> > <field name="categoryId" type="int" indexed="true" stored="false" > required="true" /> > <field name="url" type="string" indexed="true" stored="true" > required="true" > /> > <field name="content" type="string" indexed="false" stored="true" > multiValued="true" required="true" /> > > > Anyone help me how can i achieve this. > > Regards, > Kumar > > > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Faceting-Query-in-Solr-tp4104881.html > Sent from the Solr - User mailing list archive at Nabble.com. >