Search Fields Boosting
Field Level Boosting
SearchBlox allows you to configure field-level boosting for individual collections or globally across all collections. Boosting improves the relevance of search results and enhances the overall search experience.
Field Level Boosting for a Single Collection
Find the Collection ID and go to <SearchBlox_Installation_Directory>/webapps/ROOT/WEB-INF/mappings/collections/.
Edit the file mapping_.json, add the boosting property "boost":200 to the required SearchBlox field, and save the file. For example, the snippet below shows how to add boosting to the description field:
"description" : {
"type" : "text",
"boost" : 500.0,
"store" : true,
"term_vector" : "with_positions_offsets",
"analyzer" : "sb_analyzer"
},
- After adding the boost value (to fields such as title, description, URL, content, etc.), you must clear and reindex the collection for the changes to take effect.
- Note: It is recommended to test field-level boosting on a sample collection first. After confirming the desired results, apply the same settings to the main collection.
Field Level Boosting for All Collections
- You can apply these changes in the mapping template file located at <SearchBlox_Installation_Directory>/webapps/ROOT/WEB-INF/mappings/mapping.json. This will apply the same field-level boost values to all collections.
- Template configuration is generally not recommended. Contact SearchBlox Support for more details.
Cluster Setup
All cluster nodes must be configured in the same way for search field-level boosting
Updated 26 days ago
