Skip to content

Commit a58ed5d

Browse files
committed
Fix wildcard and regex links
1 parent f01b173 commit a58ed5d

File tree

1 file changed

+8
-4
lines changed
  • docs/50_Querying/8_Exercises

1 file changed

+8
-4
lines changed

docs/50_Querying/8_Exercises/3_.mdx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,24 @@
22

33
## `wildcard`
44

5-
<Playground url="https://search-playground.mongodb.com/tools/code-sandbox/snapshots/679cab92d0df60f0254e5d64">words that starts-with not matching as expected</Playground>
5+
<Playground url="https://search-playground.mongodb.com/tools/code-sandbox/snapshots/67d1e0cd20b1632e508742aa">words that starts-with not matching as expected</Playground>
66
<details>
77
<summary>Solution</summary>
88
<div>
99
```js
1010
"analyzer": "lucene.standard"
1111
```
1212
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.
1315

14-
<Playground url="https://search-playground.mongodb.com/tools/code-sandbox/snapshots/679cac0bd0df60f0254e5d66">solution</Playground>
16+
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/67d1e0f5643f61797f19d31b">solution</Playground>
1517
</div>
1618
</details>
1719

1820
## ``regex``
1921

20-
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679caa71d0df60f0254e5d60">Full string regex not working as expected</Playground>
22+
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/67d1dff6643f61797f19d319">Full string regex not working as expected</Playground>
2123
<details>
2224
<summary>Solution</summary>
2325
<div>
@@ -27,6 +29,8 @@
2729
Matching needs to occur across the full string, and thus needs to be `lucene.keyword`
2830
analyzed so that the full string is indexed as a single unit.
2931

30-
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679caadcd0df60f0254e5d62">solution</Playground>
32+
<Playground url="https://search-playground.mongodb.com/tools/code-sandbox/snapshots/679caadcd0df60f0254e5d62">solution</Playground>
3133
</div>
3234
</details>
35+
36+

0 commit comments

Comments
 (0)