Skip to content

Allow weighted properties

Marijn van Wezel requested to merge allow-weighted-properties into master

This merge request introduces weighted (boosted) fields to the SearchTermFilter, allowing a user to specify a boost for free-text search fields.

To specify a boost, you can use the ^%d syntax in the search term properties, like so:

|search term properties=Title^6,Content^4,Pdf.attachment-content

In the example above, Title has been given a boost of 6, and Content has been given a boost of 4. If no boost is specified, the field will not be boosted.

A match in a boosted field takes precedence over a match in a non-boosted field. Therefore, if a match occurred in a boosted field, it will appear higher in the search results.

Merge request reports

Loading