Commit 6f08f64
authored
Improve search relevance and ensure less janky 'as you type' results (#2304)
* Improve search relevance and ensure less janky 'as you type' results
- Improve search relevance with exact title matching
and prefix search capabilities
- Add title prefix boosting for smoother
autocomplete behavior:
- Single character queries (e.g., "A") get high
boost (100x) to show only titles starting with that
letter
- Two character queries get medium boost (4x)
- Up to 10 characters uses a term query with no
additional boost
- This creates a less janky autocomplete
experience where results don't shift dramatically as
you type
- Add bidirectional synonym expansion for query-time
boosting
- Ensures both .NET and dotnet score high when the
page title is just .NET
- Synonyms are expanded in both directions so
searching either term finds the relevant page
- Apply keyword normalizer to all keyword fields for
consistent case-insensitive matching
- Reorganize and expand config/search.yml with new
synonyms (edr, eks, kpi, logsdb, rag, tsvb) and
diminish terms (curator, hadoop, glossary)
- Remove unused url_segment_count field from
document mapping
Test plan
- Verify all search relevance tests pass with
updated expected results
- Test prefix searches with short queries (1-2
characters) return sensible results with titles
starting with those characters
- Verify typing progressively longer queries
produces stable results without excessive shifting
- Verify synonym expansion works bidirectionally
(searching "dotnet" finds ".NET" pages and vice
versa)
- Confirm exact title matches are properly boosted
in search results
* Code QoL improvements
* fix test1 parent 865311c commit 6f08f64
File tree
18 files changed
+679
-552
lines changed- config
- src
- Elastic.ApiExplorer/Elasticsearch
- Elastic.Documentation.Configuration/Search
- Elastic.Documentation/Search
- Elastic.Markdown
- Exporters/Elasticsearch
- IO
- api/Elastic.Documentation.Api.Infrastructure/Adapters/Search
- tests-integration
- Elastic.Assembler.IntegrationTests
- Search
- Search.IntegrationTests
- tests
- Elastic.ApiExplorer.Tests
- Elastic.Markdown.Tests
- Inline
- Search
- authoring/Framework
18 files changed
+679
-552
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
37 | 10 | | |
| 11 | + | |
38 | 12 | | |
39 | 13 | | |
40 | 14 | | |
| |||
65 | 39 | | |
66 | 40 | | |
67 | 41 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
| |||
Lines changed: 41 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
12 | 46 | | |
13 | 47 | | |
14 | 48 | | |
| |||
78 | 112 | | |
79 | 113 | | |
80 | 114 | | |
| 115 | + | |
81 | 116 | | |
82 | 117 | | |
83 | | - | |
| 118 | + | |
84 | 119 | | |
85 | 120 | | |
86 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
87 | 124 | | |
88 | 125 | | |
89 | | - | |
| 126 | + | |
90 | 127 | | |
91 | 128 | | |
92 | 129 | | |
| |||
Lines changed: 18 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
21 | 31 | | |
22 | | - | |
| 32 | + | |
23 | 33 | | |
24 | | - | |
25 | 34 | | |
26 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
27 | 39 | | |
28 | 40 | | |
29 | 41 | | |
| |||
43 | 55 | | |
44 | 56 | | |
45 | 57 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | 58 | | |
61 | 59 | | |
62 | 60 | | |
| |||
72 | 70 | | |
73 | 71 | | |
74 | 72 | | |
75 | | - | |
| 73 | + | |
76 | 74 | | |
77 | 75 | | |
78 | 76 | | |
| |||
0 commit comments