Skip to content

Commit

Permalink
docs(search): example of entity weighting (#11511)
Browse files Browse the repository at this point in the history
  • Loading branch information
david-leifker authored Oct 1, 2024
1 parent dea17d4 commit 7340ec7
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions docs/how/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,32 @@ queryConfigurations:
boost_mode: multiply
```

##### Example 4: Entity Ranking

Alter the ranking of entities. For example, chart vs dashboard, you may want the dashboard
to appear above charts. This can be done using the following function score and leverages a prefix match on the entity type
of the URN. Depending on the entity the weight may have to be adjusted based on your data and the entities
involved since often multiple field matches may shift weight towards one entity vs another.

```yaml
queryConfigurations:
- queryRegex: .*
simpleQuery: true
prefixMatchQuery: true
exactMatchQuery: true
functionScore:
functions:
- filter:
prefix:
urn:
value: 'urn:li:dashboard:'
weight: 1.5
score_mode: multiply
boost_mode: multiply
```

### Search Autocomplete Configuration

Similar to the options provided in the previous section for search configuration, there are autocomplete specific options
Expand Down

0 comments on commit 7340ec7

Please sign in to comment.