Getting Started with Fusion:
Part Two - Getting Data Out

In Part 1, we used the Index Workbench to get data into Fusion by previewing the dataset, configuring the index pipeline, and then indexing the data.

In Part 2, we’ll explore the Query Workbench and learn how to configure Fusion’s output, including faceting.

Facets are the ubiquitous dynamic lists of categories or features displayed as part of a search results page. Facets provide a simple way for users to explore and filter their search results without having to construct complicated queries.

Before you begin

To proceed with this part of the tutorial, you must first complete Part 1, which gives you an indexed dataset for the Query Workbench to read.

The dataset has four fields that end users of our search application might find relevant:

  • movieId - unique identifier, used as the document ID.

  • genres_ss - a list of one or more genre labels.

  • title_txt - the name of the movie (plus its year of release).

The field suffixes indicate the type of data stored in each field:

  • Fields with suffix _ss contain one or more strings values ("multi-valued string field").

    String fields require an exact match between the query string and the string value stored in that field.

  • Fields with suffix _txt contain text.

    Text fields allow for free text search over the field contents. For example, because the movie titles are stored in a text field, a search on the word "Star" will match movies titled "Star", "A Star is Born", all movies in the Star Wars and Star Trek franchies, as well as "Dark Star" "Lone Star" and "Star Kid".

The different field types allow for different kinds of searches. The query pipeline configuration determines how fields are searched.

1. Explore the default search results

The Query Workbench allows you to interactively configure a query pipeline while previewing the search results it produces. A query pipeline converts a free text query submitted to your search application into a structured query for Solr. Facets are configured as part of a query pipeline.

  1. Log in to Fusion, click Search, and make sure the ml-movies collection is selected.

  2. Navigate to Home > Query Workbench.

    QWB ml movies 0

  3. Try searching the data to see the default output.

    The output is configured by the default query pipeline, named collection-name-default. A default query pipeline consists of these stages:

    • Recommendation Boosting - Tune search for specific use cases.

    • Query Fields - Specify the set of fields over which to search.

    • Field Facet - Specify the fields to use for faceting.

    • Solr Query - Perform the query and return the results.

      This is the only stage that is always required in order to perform a query and receive results.

  4. Turn off the Solr Query stage.

    All search results disappear from the preview pane because no query is sent to Fusion’s Solr core. This stage must be enabled in order to get search results.

  5. Turn the Solr Query stage on and turn all other stages off.

    Now the search results look much like they did before. At this point, the disabled stages do not affect the output because they are not yet configured.

2. Configure facets

The default search is the wildcard search, which returns all documents in the collection. We’ll enter a different search query to get started with facet configuration.

  1. Enter the query string "star".

    This returns all movies which have the word "star" in the title.

    QWB ml movies 1

    The "+ Added to page" icons indicate that this set of search results is ordered differently than the previous wildcard search.

  2. Click Add a field facet and select the genres_ss field.

    QWB ml movies 3

  3. Click Sci-Fi.

    QWB ml movies 4

    The "Rank +1" icons indicate search results that were boosted based on the selected facet.

3. Save the query pipeline configuration

  1. Click Save.

    The Save Pipeline window appears. By default, you’ll overwrite the default pipeline for this datasource.

  2. Click Save pipeline.

  3. On the left side of the Query Workbench, click the Field Facet query pipeline stage.

    Notice that the genres_ss field facet is shown here. We used the Add a field facet link to configure this query pipeline stage, but you can also do it in this stage configuration panel.

    QWB ml movies 7

  4. Click Cancel to close the stage configuration panel.

What’s next

With just one facet field combined with keyword search, this prototype is already beginning to feel like a real search application.

In Part 3, we’ll enable signals, generate some signal data, aggregate it, and search it to see what it looks like. Signals can be used for recommendations or boosting.

In a production environment, signals are generated through the natural actions of your search application’s end users. At this stage in our tutorial, we’re using the Query Workbench as our prototype application. In Part 4, we’ll install Lucidworks View and learn how to connect a stand-alone search application to Fusion and customize the interface.