Skip to content

Commit f74b750

Browse files
DOCSP-27853: Atlas search mongosh methods (Backport to 6.0) (#5528)
* DOCSP-27853: Atlas search mongosh methods (#3390) * (DOCSP-29546): db.createSearchIndex method (#3140) * (DOCSP-29546): db.createSearchIndex method * fix build errors * add sub-page for mongosh methods * fix build errors * change page title * add wrapper info * add landing page in snooty.toml * typo * edits * wording * simplify layout * tweak example intro * remove quotes in field names * address review comments * single-source table intro * tweak intro * fix formatting * remove accidentally added file (#3290) * (DOCSP-29548): db.collection.updateSearchIndex method (#3292) * (DOCSP-29548): db.collection.updateSearchIndex method * add method descriptions to tables * add new method page to toc * fix release note wording * first pass at replacements * fix replacements * more replacements * replacement for drop * make example runnable * update replacements * fix example * (DOCSP-29549): dropSearchIndex mongosh method (#3307) * (DOCSP-29549): dropSearchIndex mongosh method * standardize collections in examples * (DOCSP-29881): Add Atlas Search db command outputs (#3139) (#3360) * (DOCSP-29881): Add Atlas Search db command outputs * wording * wording * typo * wording * change admonition language to point to listSearchIndexes * fix stage name * adjust language for updateSearchIndex response * edits * DOCSP-29552: db.collection.getSearchIndexes method page (#3369) * WIP * update toc * final first draft * fix build errors * fix replacement * fix replacement * fix replacement * wording * remove periods * wording * typo * add link * add missing replacement * address review comments * fix build error * fix build error * typo * single source create access control * fix typo * single source access control sections * add name option * typo * wording * wording * fix section titles * standardize casing * DOCSP-29544: $listSearchIndexes aggregation stage (#3382) * WIP * WIP * change file name * first draft * add missing ref * add learn more * fixups * fix id type * remove extra file * fix id mismatch * edit * fix section title * add lead-in to example subsections * edits to BUILDING description per Evan * adjust table widths * add missing files * add fts replacement * (DOCSP-33442): Add new fields to listSearchIndexes output (#4887) * WIP * (DOCSP-33442): Add new fields to listSearchIndexes output * add line breaks to field names * add more info link for statuses * edits * typo * change examples * wording * edits * standardization * typo * wording * add possible statuses for synonyms * address review comments * simplify * typo * standardize object vs document * WIP * fix build errors * add table heading * add synonym detail link * edit fields * update examples with real output * add multi doc example * add staged index to output * better pretty printing in output docs * tweak * add version-added * Evan review edits * formatting * edits * add versionadded * update atlas search nav page * update dropSearchIndex * sync from master * sync from master * sync from master * remove references to future versions * standardize versionadded * change versionadded text
1 parent a16750f commit f74b750

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2461
-2
lines changed

snooty.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ toc_landing_pages = [
125125
"/reference/command/nav-user-management",
126126
"/reference/configuration-options",
127127
"/reference/method",
128+
"/reference/method/js-atlas-search",
128129
"/reference/method/js-bulk",
129130
"/reference/method/js-client-side-field-level-encryption",
130131
"/reference/method/js-collection",
@@ -292,6 +293,7 @@ auto-encrypt-options = "autoEncryptionOpts"
292293
title-auto-encrypt-options = "AutoEncryptionOpts"
293294
enterprise-download-link = "https://www.mongodb.com/try/download/enterprise"
294295
pb = ":abbr:`PB (petabyte)`"
296+
fts = "Atlas Search"
295297

296298
# C2C Product
297299
c2c-full-product-name = "MongoDB Cluster-to-Cluster Sync"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
If your deployment enforces access control, the user running
2+
|method-name| must have the :authaction:`createSearchIndexes` privilege
3+
action on the database or collection:
4+
5+
.. code-block:: javascript
6+
7+
{
8+
resource: {
9+
db : <database>,
10+
collection: <collection>
11+
},
12+
actions: [ "createSearchIndexes" ]
13+
}
14+
15+
The built-in :authrole:`readWrite` role provides the
16+
``createSearchIndexes`` privilege. The following example grants
17+
``accountUser01`` the ``readWrite`` role on the ``products`` database:
18+
19+
.. code-block:: javascript
20+
21+
db.grantRolesToUser(
22+
"accountUser01",
23+
[ { role: "readWrite", db: "products" } ]
24+
)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
If your deployment enforces access control, the user running
2+
|method-name| must have the :authaction:`dropSearchIndex` privilege
3+
action on the database or collection:
4+
5+
.. code-block:: javascript
6+
7+
{
8+
resource: {
9+
db : <database>,
10+
collection: <collection>
11+
},
12+
actions: [ "dropSearchIndex" ]
13+
}
14+
15+
The built-in :authrole:`dbAdmin` and :authrole:`readWrite` roles provide
16+
the ``dropSearchIndex`` privilege. The following example grants the
17+
``readWrite`` role on the ``qa`` database:
18+
19+
.. code-block:: javascript
20+
21+
db.grantRolesToUser(
22+
"<user>",
23+
[ { role: "readWrite", db: "qa" } ]
24+
)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
If your deployment enforces access control, the user running
2+
|method-name| must have the :authaction:`listSearchIndexes` privilege
3+
action on the database or collection:
4+
5+
.. code-block:: javascript
6+
7+
{
8+
resource: {
9+
db : <database>,
10+
collection: <collection>
11+
},
12+
actions: [ "listSearchIndexes" ]
13+
}
14+
15+
The built-in :authrole:`read` role provides the the
16+
``listSearchIndexes`` privilege. The following example grants the
17+
``read`` role on the ``qa`` database:
18+
19+
.. code-block:: javascript
20+
21+
db.grantRolesToUser(
22+
"<user>",
23+
[ { role: "read", db: "qa" } ]
24+
)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
If your deployment enforces access control, the user running
2+
|method-name| must have the :authaction:`updateSearchIndex` privilege
3+
action on the database or collection:
4+
5+
.. code-block:: javascript
6+
7+
{
8+
resource: {
9+
db : <database>,
10+
collection: <collection>
11+
},
12+
actions: [ "updateSearchIndex" ]
13+
}
14+
15+
The built-in :authrole:`readWrite` and :authrole:`restore` roles provide
16+
the ``updateSearchIndex`` privilege. The following example grants the
17+
``readWrite`` role on the ``qa`` database:
18+
19+
.. code-block:: javascript
20+
21+
db.grantRolesToUser(
22+
"<user>",
23+
[ { role: "readWrite", db: "qa" } ]
24+
)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.. important::
2+
3+
This command can only be run on a deployment hosted on
4+
:atlas:`MongoDB Atlas </>`, and requires an Atlas cluster tier of at
5+
least M10.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.. list-table::
2+
:widths: 30,70
3+
:header-rows: 1
4+
5+
* - Name
6+
7+
- Description
8+
9+
* - :dbcommand:`createSearchIndexes`
10+
11+
- .. include:: /includes/atlas-search-commands/command-descriptions/createSearchIndexes-description.rst
12+
13+
* - :dbcommand:`dropSearchIndex`
14+
15+
- .. include:: /includes/atlas-search-commands/command-descriptions/dropSearchIndex-description.rst
16+
17+
* - :dbcommand:`updateSearchIndex`
18+
19+
- .. include:: /includes/atlas-search-commands/command-descriptions/updateSearchIndex-description.rst
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
|method-name-title| triggers an index build. There may be a delay
2+
between when you receive a response from the command and when the index
3+
is ready.
4+
5+
To see the status of your search indexes, use the
6+
:pipeline:`$listSearchIndexes` aggregation stage.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
After you run |method-name|, there may be a delay between when you
2+
receive a response from the command and when the index is deleted.
3+
4+
To see the status of your search indexes, use the
5+
:pipeline:`$listSearchIndexes` aggregation stage. Once your index is
6+
deleted, that index no longer appears in the ``$listSearchIndexes``
7+
output.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
|method-name-title| triggers an index build with the new index
2+
definition. There may be a delay between when you receive a response
3+
from the command and when the updated index is ready.
4+
5+
The old index definition can still support queries while the new index
6+
is being built. Once the new index finishes building, the old index is
7+
no longer usable. To see the status of your search indexes, use the
8+
:pipeline:`$listSearchIndexes` aggregation stage.

0 commit comments

Comments
 (0)