Search Fields Boosting

Field Level Boosting

SearchBlox allows you to configure field level boosting per collection basis as well as globally which applies to all the collections. This boosting setting can increase the relevance of the search results for a better search experience.

Field Level Boosting for single Collection

  • Identify the Collection ID and go to the path <SearchBlox_Installation_Directory>/webapps/ROOT/WEB-INF/mappings/collections/
  • Edit the file mapping_<collection-ID>.json, add boosting property "boost":200 to any SearchBlox field as required and save the file. For Example, the below snippet shows the boosting syntax of the SearchBlox field description:
"description" : {
          "type" : "text",
          "boost" : 500.0,
          "store" : true,
          "term_vector" : "with_positions_offsets",
          "analyzer" : "sb_analyzer"
        },
  • Once you apply the boost value(to title, description, URL, content etc. fields), the collection needs to be cleared and re-indexed to take the effect.

Note: Please try field-level boosting with a test collection and once the intended results show up, you can apply the same settings to the required collection.

Field Level Boosting for all Collections

You can apply the above changes directly to the mapping template file(<SearchBlox_Installation_Directory>/webapps/ROOT/WEB-INF/mappings/mapping.json). Once configured, all the collections will have the same field level boost values.
Template configuration is not recommended in most cases. Please contact support to know more.

📘

Cluster Setup

All the cluster nodes to be configured the same way for search field-level boosting.