You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/50_Querying/8_Exercises/3_.mdx
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,22 +2,24 @@
2
2
3
3
## `wildcard`
4
4
5
-
<Playgroundurl="https://search-playground.mongodb.com/tools/code-sandbox/snapshots/679cab92d0df60f0254e5d64">words that starts-with not matching as expected</Playground>
5
+
<Playgroundurl="https://search-playground.mongodb.com/tools/code-sandbox/snapshots/67d1e0cd20b1632e508742aa">words that starts-with not matching as expected</Playground>
6
6
<details>
7
7
<summary>Solution</summary>
8
8
<div>
9
9
```js
10
10
"analyzer":"lucene.standard"
11
11
```
12
12
The matching needs to occur at the word level, and thus needs (non-keyword) tokenization.
13
+
14
+
And `allowAnalyzedField: true` needs to be set, allowing searches when using a tokenizing analyzer.
<Playgroundurl="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679caa71d0df60f0254e5d60">Full string regex not working as expected</Playground>
22
+
<Playgroundurl="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/67d1dff6643f61797f19d319">Full string regex not working as expected</Playground>
21
23
<details>
22
24
<summary>Solution</summary>
23
25
<div>
@@ -27,6 +29,8 @@
27
29
Matching needs to occur across the full string, and thus needs to be `lucene.keyword`
28
30
analyzed so that the full string is indexed as a single unit.
0 commit comments