FEATURE: allow restricting duplication in search index (#20062)

* FEATURE: allow restricting duplication in search index

This introduces the site setting `max_duplicate_search_index_terms`.
Using this number we limit the amount of duplication in our search index.

This allows us to more correctly weight title searches, so bloated posts
don't unfairly bump to the top of search results.

This feature is completely disabled by default and behind a site setting

We will experiment with it first. Note entire search index must be rebuilt
for it to take effect.


---------

Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
This commit is contained in:
Sam
2023-01-31 12:41:31 +11:00
committed by GitHub
parent c5c72a74b7
commit 07679888c8
4 changed files with 69 additions and 0 deletions

View File

@@ -2192,6 +2192,9 @@ backups:
client: true
search:
max_duplicate_search_index_terms:
default: -1
hidden: true
use_pg_headlines_for_excerpt:
default: false
hidden: true