Does facet searching come built in when you setup your schema or do you have to do some things to set this up?
Does it basically work out of the box on all the fields th
The below code in C#, by using SolrNet package. The Facet you can do it on the fields stored in SOLR, make sure its string and doesn't have space for better results. The mincount is for limiting the minimum number to get listed in facet.
QueryOptions options = new QueryOptions
{
Facet = new FacetParameters
{
Queries = new ISolrFacetQuery[]
{
new SolrFacetFieldQuery("field1"),
new SolrFacetFieldQuery("field2")
},
MinCount = 20
}
};
And the below code to get the results, query - is the search entered in front end.
var result = solr.Query(query, options);