On Apr 19, 2007, at 9:32 AM, Jennifer Seaman wrote:
Can anyone provide a quick tutorial on how to setup facet browsing? After a keyword search I just want to allow the user to narrow the results by category, then by state, then by city and then by company.

Some sample code would be appreciated.

At the moment your best bet will be Solr's excellent wiki on faceted browsing: http://wiki.apache.org/solr/SimpleFacetParameters

How you build your app to interact with Solr is going to be unique to your situation, so an exact example won't be handy, but you can infer a lot. If you've got "string" indexed fields for category, state, city, and company for documents in the index, then you'll first make a query asking for the category facet back (&facet=on&facet.field=category...) and your user interface will keep the state of which facet the user is seeing, and you'd change the facet field you request as the user drills in.

As you get more into the implementation and tinkering with Solr, you might have more specific questions to refine what you're doing, but with a little elbow grease and the Solr wiki you'll go far!

        Erik

Reply via email to