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 that you have setup to be sortable?
then you just use the fq query syntax and it will return the facet xml along with the search results?
Is there a nice article on this that helped you first time around?
Yes, you can facet any indexed field out of the box. However it might not give you the results you expect until you configure faceting fields according to your data types.
Faceting is enabled and used through the facet.* parameters, not fq. fq is used when the user selects a facet value.
Some good Solr tutorials:
Faceting from Apache solr reference guide.
Yes, Simply add
&facet=true&facet.field={fieldname}
to your request Url.Here is another tutorial:Faceting
SolrNet package from Nuget Packages in C# provides a simple way of achieving this. The documentation helps. Here's an example,
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.
And the below code to get the results, query - is the search entered in front end.