Get facet results only in Solr

I am trying to make search on my database using Solr, and i need to build a facet for the date of the articles(2011-6-12,2011-7-1 ..etc) and another facet for category(sport, news..etc) i built my php code using apache_solr_service and every thing is fine till now, i can do search for my data in the database, but i want to use facet to filter the articles that are created in specific date or to get the articles that belong to a specific category,

i used:


its returned all the articles that have 'ruba' word and give me the count of articles that have been created in 2011-6-21.

what i need is to get only the articles that have ruba word AND are created on 2011-6-21, i want onlyfacet results to be returned

asked May 16, 2015 in SOLR by rajesh
0 votes

1 Answer

0 votes
Best answer
Try using filter query, fq=datecreated:2011-6-21 instead of facet
answered May 16, 2015 by rajesh