Solr Search

The Solr Search application, which is based on Apache Solr, allows you to perform keyword searches across Hadoop data. A wizard lets you style the result snippets, specify facets to group the results, sort the results, and highlight result fields.

Solr Search Installation and Configuration

Solr Search is one of the applications installed as part of Hue. For information about installing and configuring Hue, see the Hue Installation manual.

Starting Solr Search

Click the Solr Search icon (image) in the navigation bar at the top of the Hue browser page. Solr Search opens to the Collection Manager. If there are no collections, the Import Collections and Cores dialog displays.

Collection Manager

In Collection Manager you import, copy, and delete collections.

Displaying the Collection Manager

When you start Solr Search, the Collection Manager displays. You navigate to the Collection Manager by clicking Collection manager in the Search page or the Template Editor.

Filtering Collections

When you type in the Filter field, the list of collections is dynamically filtered to display only those rows containing text that matches the specified substring.

Importing Collections

  1. If there are existing collections, click the image Import button at the top right. The Import Collections and Cores dialog displays.
  2. Check the checkboxes next to the collections to import.
  3. Click Import Selected. The collection is added to the Collection Manager.

Editing Collection Properties

  1. In the Collection Manager, click a collection.
  2. In the COLLECTION area on the left, click Properties.
  3. Edit a property and click Save.

Searching a Collection

  1. In the Collection Manager, click Search page or click Search it in the Collection area on the left. The Search page displays.
  2. Select a collection from the Search in drop-down list.
  3. Type a search string in the Search... text box.
  4. Press Enter or click the image icon.

  5. If you have defined facets, click a facet to display only those results in the group defined by the facet.

  6. If you have defined sorting fields, select from the Sort by drop-down list to sort the results.
  7. Click image to clear the search string.

Styling Search Results

Do one of the following:

Template Editor

The Template Editor provides four features:

Snippet Editor

  1. In the Snippet Editor, click a tab to choose the method for editing the search snippet fields and styling:
  2. Click Save.

Facet Editor

By default, faceting search result fields is disabled. Click Enabled to enable faceting.

  1. In the Template Editor, click 2. Facets. You can move between the facet tabs by clicking each Step tab, or by clicking Back and Next.
  2. In the General tab, specify
  3. In the Field, Range, and Date Facet tabs, specify the facet properties and click image Add.
  4. In the Facets Order tab, drag and drop the facet to specify the order in they appear in the Search page.
  5. Click Save. When you display the Search page, the facets display on the left.

Sorting Editor

By default, sorting on search result fields is disabled. Click Enabled to enable sorting.

  1. In the Template Editor, click 3. Sorting.
  2. In the Field drop-down, select a field. Optionally specify a label for the field.
  3. The default order is ascending. Click the arrows to change the order.
  4. Click image Add.
  5. Click Save. When you display search results, the results are sorted by the fields in the order that they appear left to right.

Highlighting Editor

By default,highlighting search result fields is disabled. Click Enabled to enable highlighting.

  1. In the Template Editor, click 3. Highlighting.
  2. Select the fields to be highlighted.
  3. Click Save. When you display search results, the selected fields are displayed with the style of the em class defined in the Advanced tab of the Snippet editor.