Skip to content

Commit 58f1aa0

Browse files
committed
ordering sections
1 parent 170857c commit 58f1aa0

File tree

7 files changed

+56
-47
lines changed

7 files changed

+56
-47
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Aggregation pipeline search stages
2+
3+
## $search
4+
5+
where the magic happens
6+
7+
## $searchMeta
8+
9+
The `$searchMeta` stage performs the same search that `$search` does, but only returns the results metadata, not actual matching documents. Results metadata includes the count of matching results and facets. This same metadata is available when using `$search` too, accessible in the $$SEARCH_META context variable.
10+
11+
**TODO**: Add exercise using $search and have developer switch to $searchMeta to see the results

docs/30_Index_configuration/2_index_config.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Most data types are queried straightforwardly, and match as one would expect. W
1414

1515
## Configuring a real Atlas Search index
1616

17-
* Visual Index Builder
17+
* Atlas Search Visual Index Builder or JSON Editor
1818
* via Compass
1919
* Atlas CLI
20+
* Driver commands

docs/30_Index_configuration/3_field_mapping.mdx

Lines changed: 3 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -31,50 +31,8 @@ mapped type.
3131
* `equals`: https://search-playground.mongodb.com/tools/code-sandbox/snapshots/678506c2b6487c1cfd0bb540
3232
* `in`:
3333

34-
### geo
35-
Dynamic mapping does not support geo-spatial fields, and require a manual/static mapping configuration.
36-
37-
* `geoWithin`: https://search-playground.mongodb.com/tools/code-playground/snapshots/669e6b762ce7658e786edbfa
38-
* `geoShape`:
39-
* `near`:
40-
4134
## Other field types
4235

43-
### autocomplete
44-
blah, don’t do it! ;)
45-
See also: Relevant As-You-Type Suggestions Search Solution
46-
47-
### document
48-
49-
Default dynamic mapping behavior, flattens nested documents into “arrays” of values on main document
50-
51-
### embeddedDocument
52-
Attribute pattern k/v matching, more nuanced than document type flattening
53-
See cool tricks for embedded documents
54-
55-
## string
56-
Basic examples
57-
lucene.standard matching case-insensitive: https://search-playground.mongodb.com/tools/code-playground/snapshots/664738af4e0a3f240a5de9d9
58-
59-
## Analysis matters
60-
“searches” query does not match “Search” with lucene.standard: https://search-playground.mongodb.com/tools/code-playground/snapshots/664739964e0a3f240a5de9db
61-
“searches” matches “Search” using lucene.english: https://search-playground.mongodb.com/tools/code-playground/snapshots/66473aa64e0a3f240a5de9dd
62-
63-
## Custom analyzers
64-
Last 4 digit of phone number matching (regex extraction during indexing, keyword analysis at query time): https://search-playground.corp.mongodb.com/tools/code-playground/snapshots/669e6c98d49ef6fad98118ba
65-
Example of being able to do ‘startsWith’ and ‘endsWith’ using wildcard and ‘reverse’ token filter:
66-
https://search-playground.mongodb.com/tools/code-playground/snapshots/6683c8bc4a45448733549bbc
67-
68-
Example of being able to do ‘startsWith’, ‘endsWith’ and ‘contains’ using nGrams: https://search-playground.mongodb.com/tools/code-playground/snapshots/6683c999934a05d9b585b6e7
69-
Relevancy
70-
Example of an as-you-type suggest configuration; sophisticated use of multi and several weighted query clauses: https://search-playground.mongodb.com/tools/code-playground/snapshots/66473b744e0a3f240a5de9e1
71-
$project score?
72-
$project scoreDetails?
73-
74-
# multi
75-
Why?
76-
Relevancy example: boost each multi uniquely
77-
Multiple language example: may not know the language of the content and each document could be different - multi across all possible languages, query across them as desired at query-time, let relevancy sort it out
78-
Example of being able to do ‘startsWith’ and ‘endsWith’ using wildcard and ‘reverse’ token filter:
79-
https://search-playground.mongodb.com/tools/code-playground/snapshots/6683c8bc4a45448733549bbc
80-
36+
* Geo-spatial
37+
* Nested documents
38+
* Strings
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# 📘 Geo-spatial
2+
3+
### geo
4+
Dynamic mapping does not support geo-spatial fields, and require a manual/static mapping configuration.
5+
6+
* `geoWithin`: https://search-playground.mongodb.com/tools/code-playground/snapshots/669e6b762ce7658e786edbfa
7+
* `geoShape`:
8+
* `near`:

docs/30_Index_configuration/4_string.mdx

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/30_Index_configuration/5_nested_docs.mdx

Whitespace-only changes.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# 📘 String fields
2+
3+
### autocomplete
4+
blah, don’t do it! ;)
5+
See also: Relevant As-You-Type Suggestions Search Solution
6+
7+
## string
8+
Basic examples
9+
lucene.standard matching case-insensitive: https://search-playground.mongodb.com/tools/code-playground/snapshots/664738af4e0a3f240a5de9d9
10+
11+
## Analysis matters
12+
“searches” query does not match “Search” with lucene.standard: https://search-playground.mongodb.com/tools/code-playground/snapshots/664739964e0a3f240a5de9db
13+
“searches” matches “Search” using lucene.english: https://search-playground.mongodb.com/tools/code-playground/snapshots/66473aa64e0a3f240a5de9dd
14+
15+
## Custom analyzers
16+
Last 4 digit of phone number matching (regex extraction during indexing, keyword analysis at query time): https://search-playground.corp.mongodb.com/tools/code-playground/snapshots/669e6c98d49ef6fad98118ba
17+
Example of being able to do ‘startsWith’ and ‘endsWith’ using wildcard and ‘reverse’ token filter:
18+
https://search-playground.mongodb.com/tools/code-playground/snapshots/6683c8bc4a45448733549bbc
19+
20+
Example of being able to do ‘startsWith’, ‘endsWith’ and ‘contains’ using nGrams: https://search-playground.mongodb.com/tools/code-playground/snapshots/6683c999934a05d9b585b6e7
21+
Relevancy
22+
Example of an as-you-type suggest configuration; sophisticated use of multi and several weighted query clauses: https://search-playground.mongodb.com/tools/code-playground/snapshots/66473b744e0a3f240a5de9e1
23+
$project score?
24+
$project scoreDetails?
25+
26+
# multi
27+
Why?
28+
Relevancy example: boost each multi uniquely
29+
Multiple language example: may not know the language of the content and each document could be different - multi across all possible languages, query across them as desired at query-time, let relevancy sort it out
30+
Example of being able to do ‘startsWith’ and ‘endsWith’ using wildcard and ‘reverse’ token filter:
31+
https://search-playground.mongodb.com/tools/code-playground/snapshots/6683c8bc4a45448733549bbc
32+

0 commit comments

Comments
 (0)