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.
This new feature completed in Thailand lets you search interactively:
As usual feel free to comment on the hue-user list or @gethue!
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
(
) 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
- If there are existing collections, click the Import button at the top right. The Import Collections and Cores dialog displays.
- Check the checkboxes next to the collections to import.
- Click Import Selected. The collection is added to the Collection Manager.
Editing Collection Properties
- In the Collection Manager, click a collection.
- In the COLLECTION area on the left, click Properties.
- Edit a property and click Save.
Searching a Collection
- In the Collection Manager, click Search page or click Search it in the Collection area on the left. The Search page displays.
- Select a collection from the Search in drop-down list.
- Type a search string in the Search... text box.
-
Press Enter or click the icon.
-
If you have defined facets, click a facet to display only those results in the group defined by the facet.
- If you have defined sorting fields, select from the Sort by drop-down list to sort the results.
- Click 'X' to clear the search string.
Styling Search Results
Do one of the following:
- In the Collection Manager, click a collection.
- In the Search page, select a collection from the Search in drop-down list and click Customize this collection. The Template Editor displays.
Template Editor
The Template Editor provides four features:
- Snippet editor - Specify the layout of the search result snippet, which fields appear in the snippet, and style the results.
- Facet editor - Define buckets in which to group results.
- Sort editor - Specify on which fields and order the results are sorted.
- Highlighting editor - Enable highlighting of search fields.
Snippet Editor
- In the Snippet Editor, click a tab to choose the method for editing the search snippet fields and styling:
-
- Visual editor - Click
to choose an overall layout for the snippet.
-
-
- Select the fields and functions from the drop-down lists on the right and click
.
-
-
- Select fields, right-click, and select Cut and Paste to place the fields on the canvas.
-
-
- Select fields and apply styling using the buttons on top.
-
-
-
- Select the data fields and functions from the drop-down lists on the right.
-
-
- Specify layout and styling using HTML tags.
-
- Preview - Preview the snippet.
-
- Advanced - Specify styles for CSS classes specified in the Source tab.
- Click Save.
Facet Editor
By default, faceting search result fields is disabled. Click Enabled to enable faceting.
- 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.
- In the General tab, specify
-
- Limit - the maximum number of values for each facet.
-
- Mincount - the minimum number of search results that fall into a group for the facet to display on the Search page.
- In the Field, Range, and Date Facet tabs, specify the facet properties and click
Add.
- In the Facets Order tab, drag and drop the facet to specify the order in they appear in the Search page.
- 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.
- In the Template Editor, click 3. Sorting.
- In the Field drop-down, select a field. Optionally specify a label for the field.
- The default order is ascending. Click the arrows to change the order.
- Click
Add.
- 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.
- In the Template Editor, click 3. Highlighting.
- Select the fields to be highlighted.
- 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.