Skip to main content

Defining target attributes for the search

In Frosmo Search, every search operation targets the same set of item attributes. In other words, when visitors execute searches on a site, or when applications call the Search API, the search engine automatically runs queries against the same set of attributes found in the items indexed for the site.

The basic search setup defines the set of indexed attributes available for a site. Using this set, you can:

  • Define the target attributes. Select which of the available attributes the search actually checks for matches. The site must have at least one target attribute.

    note

    You can only define string and string array attributes as target attributes since the search only applies to text.

  • Define relative ranking weights for the target attributes. Customize how the selected attributes get weighed relative to one another when ranking search results. You define a ranking weight for each target attribute. An item that has a match in a high-weight attribute is considered more relevant than an item that has a match in a low-weight attribute. The item with the high-weight attribute is therefore more likely to get a higher final ranking than the item with the low-weight attribute.

    For example, if you have name and brand selected as the target attributes, and if you set their weights to 10 and 1, respectively, the search engine gives matches in the name attribute ten times the weight than matches in the brand attribute, significantly increasing the relevance of the former compared to the latter.

    note

    Target attribute ranking weight is not the only factor that determines relevance, so the item with the low-weight attribute might still end up with the higher final ranking.

You can also check which search features the attributes support.

tip

If you want to add or remove attributes to or from the set of indexed attributes, contact Frosmo support. Frosmo will update the site's basic search setup accordingly.

Defining the target attributes

The target attributes you select and the weights you define apply to all search operations on the site.

To define the target attributes:

  1. In the Frosmo Control Panel, in the sidebar, select More > Search.

  2. Select the Attributes tab. The view lists all indexed attributes for the site. If an attribute has a ranking weight defined and is marked as enabled, the attribute is currently a target attribute.

    Defining target attributes for the search
  3. To add an attribute to the target attributes:

    1. In the attributes list, click the quick menu button for the (disabled) attribute, and select Edit.

      Editing an indexed attribute
      note

      You can only define string and string array attributes as target attributes since the search only applies to text.

    2. Set the Status to Enabled.

    3. Enter a Ranking weight for the attribute. The weight must be a whole number between 1 and 100. The higher the number, the more relevant the search engine considers items that have a match in this attribute. For example, if you set the weight to 10, and you have another target attribute with a weight of 1, the search engine considers items that have a match in this attribute ten times more relevant than items that have a match in the other attribute.

    4. Click Save. Search operations now target the attribute.

    Adding an attribute to the target attributes
  4. To remove an attribute from the target attributes:

    1. In the attributes list, click the quick menu button for the (enabled) attribute, and select Edit.

      Editing an indexed attribute
    2. Set the Status to Disabled.

    3. Click Save. Search operations no longer target the attribute.

    Adding an attribute to the target attributes
  5. To change the ranking weight of a target attribute:

    1. In the attributes list, click the quick menu button for the (enabled) attribute, and select Edit.

      Editing an indexed attribute
    2. Enter a new Ranking weight for the attribute.

    3. Click Save. Search operations now use the new ranking weight for the attribute.

Checking indexed attributes

You can use the indexed attributes list to check the data type and supported search features for each attribute.

To check the indexed attributes:

  1. In the Frosmo Control Panel, in the sidebar, select More > Search.

  2. Select the Attributes tab. The view lists all indexed attributes for the site.

  3. Check the attributes:

    • Type: Data type of the attribute. You can only define string and string array attributes as target attributes since the search only applies to text.

    • Sortable: Whether search results can be sorted based on the attribute.

    • Facet: Whether the attribute has been defined as a facet in the basic search setup.

    Defining target attributes for the search