Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Solr and facet search

Tags:

solr

facet

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?

like image 797
Blankman Avatar asked Mar 01 '10 17:03

Blankman


People also ask

What is Solr facet search?

What Is Faceted Search? Faceted search is the dynamic clustering of items or search results into categories that let users drill into search results (or even skip searching entirely) by any value in any field. Each facet displayed also shows the number of hits within the search that match that category.

What is a facet query?

Facets, also called smart filters, are a type of search filter that are used to help customers narrow down their search results quickly. Unlike static filters that are the same for every search, facets are dynamic — they can change depending on the context of the search query.

How does Solr search work?

Solr works by gathering, storing and indexing documents from different sources and making them searchable in near real-time. It follows a 3-step process that involves indexing, querying, and finally, ranking the results – all in near real-time, even though it can work with huge volumes of data.


2 Answers

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:

  • http://lucene.apache.org/solr/tutorial.html
  • http://www.lucidimagination.com/Community/Hear-from-the-Experts/Podcasts-and-Videos/Solr-Tutorial
like image 136
Mauricio Scheffer Avatar answered Oct 11 '22 04:10

Mauricio Scheffer


Yes, Simply add &facet=true&facet.field={fieldname} to your request Url.

Here is another tutorial:Faceting

like image 42
James Lawruk Avatar answered Oct 11 '22 04:10

James Lawruk