FIX: Inject extra lexemes for host lexeme.

```
discourse_development=# SELECT alias, lexemes FROM TS_DEBUG('www.discourse.org');
 alias |       lexemes
-------+---------------------
 host  | {www.discourse.org}

discourse_development=# SELECT TO_TSVECTOR('www.discourse.org');
      to_tsvector
-----------------------
 'www.discourse.org':1
```

Given the above lexeme, we will inject additional lexeme by splitting
the host on `.`. The actual tsvector stored will look something like

```
               tsvector
---------------------------------------
 'discourse':1 'discourse.org':1 'org':1 'www':1 'www.discourse.org':1
```
This commit is contained in:
Guo Xiang Tan
2020-07-09 14:56:02 +08:00
parent 5c31216aea
commit 5c230266d3
4 changed files with 64 additions and 43 deletions

View File

@@ -379,7 +379,7 @@ login:
discord_trusted_guilds:
default: ""
type: list
external_auth_skip_create_confirm:
external_auth_skip_create_confirm:
default: false
client: true
enable_sso:
@@ -1750,9 +1750,6 @@ search:
search_ranking_normalization:
default: '1'
hidden: true
search_inject_extra_terms:
default: true
hidden: true
min_search_term_length:
client: true
default: 3