Moving from Simple Search to Faceted Search

In early 2000, most organizations wanted a simple search button or search function that gave them 10 links on a search results page to find documents and web pages faster. As the volume of data grew, search engine researchers saw that the frustration level of users grew with the relevance of the search results presented based on a few keywords. Enter “Faceted Search“, popularized by websites like Amazon.com as a way to narrow down the search results based on information attributes (aka facets) for the content or data that is being displayed. For product or e-commerce sites, this was a perfect way to help the consumer find the right item they were looking for from the millions of products they sold.

In the enterprise search or intranet search world, the facets were mainly dates, content types or access controlled information that business users were looking for. Narrowing down the search results through facet filters reduces the level of frustration among the business users as they are now in control of the search results displayed to a certain extent through these filters. Google search has had success with the filters it has used for news search especially with faceting on topics (business, technology, science, politics etc.) and time-sensitive information. While implementation of simple search involved crawling the content and creating a simple search page, faceted search requires us to be a little more thoughtful in the selection of facets for the user.

Customers often pose the question around what types of facets are available for display within SearchBlox and what UI is best suited to offer the best facet selection for the end users. SearchBlox, out-of-the-box provides keywords, date, content type and content size facets for display but provides the framework to create a facet without any coding. You can edit our HTML plugin within SearchBlox to add or remove facets or even set a different display name for a facet field. You can create term, date or number range faceting on the fly without touching a schema file or any backend. The facets can be specified on the query string and created on the fly to return the right number of values.

Here are some examples of how to create faceted results from just the query string. Of course, you can ignore all of this and simply use our AngularJS based plugin. (Faceted Search)

To enable term facets on a content field like keywords, title, description or any custom field that is indexed through the meta tag within the HTML page (add a custom field with just a meta tag in your page for example.
<meta name=”SECTION” content=”WORLD”> adds a custom field called Section that can be faceted with a value of WORLD)

facet=on
facet.field=keywords (if keywords is the field we want to facet)

Example Query String:

http://localhost:8080/searchblox/servlet/SearchServlet?facet=on&query=time&facet.field=keywords
f.keywords.size=5
(you can control the number of values returned by passing the size in the parameter)

The default number of categories for the facet is 10

Example with one facet and size setting :

http://localhost:8080/searchblox/servlet/SearchServlet?facet=on&query=time&facet.field=keywords&f.keywords.size=25

When the user clicks on a category for a facet, the query to be passed to be SearchBlox will contain a filter value on what the user selected.

Example with one facet and filter applied to the query string :

http://localhost:8080/searchblox/servlet/SearchServlet?facet=on&query=time&facet.field=keywords&f.keywords.size=25&f.keywords.filter=travel

Example with 2 facets and 2 filters applied to the query string :

http://localhost:8080/searchblox/servlet/SearchServlet?facet=on&query=time&facet.field=CPS_SECTION_PATH&facet.field=keywords&f.keywords.size=5&f.CPS_SECTION_PATH.size=15
&f.keywords.filter=bbc&f.CPS_SECTION_PATH.filter=data

Range Facets (Only applies to numbers and dates)

facet.field=size
f.size.range=[TO100000]
f.size.range=[100001TO]

Example for number range facet :

http://localhost:8080/searchblox/servlet/SearchServlet?facet=on&query=time&facet.field=CPS_SECTION_PATH&facet.field=keywords&f.keywords.size=5&f.CPS_SECTION_PATH.size=15
&f.keywords.filter=bbc&f.CPS_SECTION_PATH.filter=data&facet.field=size&f.size.range=[*TO100000]&f.size.range=[100001TO*]

Date Range Facet

facet.field=indexdate
f.indexdate.range=[*TO2012-02-28T00:00:26]

Example for date range faceting :

http://localhost:8080/searchblox/servlet/SearchServlet?facet=on&query=time&facet.field=CPS_SECTION_PATH&facet.field=keywords&f.keywords.size=5&f.CPS_SECTION_PATH.size=15
&f.keywords.filter=bbc&f.CPS_SECTION_PATH.filter=data&facet.field=size&f.size.range=[*TO100000]&&f.size.range=[100001TO*]&facet.field=indexdate&f.indexdate.range=[*TO2012-02-28T00:00:26]

Date Histogram Facets

facet.field=indexdate

Possible Values
f.indexdate.interval=week
f.indexdate.interval=day
f.indexdate.interval=month
f.indexdate.interval=year
f.indexdate.interval=hour
f.indexdate.interval=minute

Examples for Date Histogram :

http://localhost:8080/searchblox/servlet/SearchServlet?facet=on&query=time&facet.field=CPS_SECTION_PATH&facet.field=keywords&f.keywords.size=5&f.CPS_SCTION_PATH.size=15
&f.keywords.filter=bbc&f.CPS_SECTION_PATH.filter=data&facet.field=size&f.size.range[*TO100000]&&f.size.range=[100001TO*]
&facet.field=indexdate&f.indexdate.interval=week

http://localhost:8080/searchblox/servlet/SearchServlet?facet=on&query=time&facet.field=CPS_SECTION_PATH&facet.field=keywords&f.keywords.size=5&f.CPS_SECTION_PATH.size=15
&f.keywords.filter=bbc&f.CPS_SECTION_PATH.filter=data&facet.field=size&f.size.range=[*TO100000]&&f.size.range=[100001TO*]&facet.field=indexdate&f.indexdate.interval=month

Contact us to help you move from a simple search feature to a usable faceted search engine.