The SearchStax Site Search solution’s Results Fields screen lets you configure two important features:
- It lets you choose which data fields Solr will return in the search results. (To choose which fields will be used to calculate the relevancy score, see the Search Fields screen.)
- It also lets you assign returned field values to specific display areas on the search-results “card.”
Results Fields are a Profile-level feature. Changes to the list of result fields can be assigned to one or more Profiles as desired (see below).
Note: When you create a new Search Profile by copying from an existing profile or add a new language to a profile, the selected Results Fields are automatically published and active immediately.
Select a field from the Return Field dropdown to add it to the display of search results. To find fields more quickly, use the Field Type dropdown to filter the list by type. You can filter by text, string, boolean, date, float, integer, location, spellcheck, or Other fields.
You can also search within the filtered field list. For example, select Text and search for title to show only text fields that include title in the field name. To show all available result fields, select All.
The Label is a human-friendly label to display beside the field value. Click the (X) button on the right to remove it. Note that you can also select a field and use the move buttons to position it in the results list.
Location-Based Search
The Location feature can place location_p and location_p_distance items in this list.
You may also map the field value into a pre-formatted position on the search-results card. For instance, you could assign the document type to the “Ribbon” field to display it in a label at the top of the card. Fields that are mapped to “Url” will be the destination of a results card once clicked. For fields that are set to use “No mapping”, these will be displayed in the results card after all the mapped fields in the order that it is set here.
Mapping a field that contains image URLs to “Thumbnail” will render the images within your results card.
Thumbnail Field Requirements
You’ll only see thumbnails when the mapped field is indexed and contains a full image URL. If your indexed documents don’t include any image URL fields, thumbnails won’t appear.
For example, Drupal teams often look for fields like field_image, but it won’t show up in the list unless a field that stores the image’s full URL is indexed.
Troubleshooting Thumbnails
- Check your indexed documents for a field that stores the image’s full URL.
- Map that URL field to Thumbnail in Results Fields.
- If you added image or media fields but thumbnails still don’t appear, confirm those fields actually contain image URLs in the indexed result.
- If a field doesn’t appear in the Return Field list, confirm the index includes a field that stores the image’s full URL.
To display the URL as a field value in your results card in addition to making it a destination, use the field once more and set it as a “No mapping”.
Note the Reload Schema icon above the list of fields. If you can’t find a field in the list, try reloading the schema. Changes to your website’s Solr schema are not automatically updated in SearchStax Studio.
Scroll down a little to see the spin button that lets us adjust the number of result items to display in each page of the output.
Hit Highlighting
Finally, there is a Hit Highlighting checkbox. If checked, matching keywords will be highlighted whenever they appear in a search result. See the Help Center’s Hit Highlighting Snippets page for further information.
Publish to Multiple Profiles
Note: This is an optional feature that can be added to your SearchStax account. Ask your Account Representative for details.
When you Publish changes to the Results Fields list, Site Search gives you an opportunity to copy the full list to your selection of profiles. (The feature overwrites the selected Profiles with the current Results Fields list.)
Simply check off the profiles where you want to share the Results Fields settings and click the Publish button.