Skip to content

Commit 133fe36

Browse files
DOCSP-11306 doc for search index delete command (#165)
DOCSP-11306 typo
1 parent d462675 commit 133fe36

File tree

2 files changed

+142
-0
lines changed

2 files changed

+142
-0
lines changed

source/reference/atlas/search-commands.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ Atlas Search Commands
1010
:titlesonly:
1111

1212
Create an Atlas Search Index </reference/atlas/search-index-create>
13+
Delete an Atlas Search Index </reference/atlas/search-index-delete>
1314

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
.. _mcli-atlas-search-index-delete-command:
2+
3+
==========================================
4+
mongocli atlas cluster search index delete
5+
==========================================
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
:class: singlecol
14+
15+
The ``search index delete`` command deletes an |fts| :atlas:`index
16+
</reference/atlas-search/index-definitions/>`. The command prompts you to
17+
confirm the operation when you run the command without the ``--force`` option.
18+
19+
You can also delete an |fts| :atlas:`index
20+
</reference/atlas-search/index-management/>` through the |service| :atlas:`UI
21+
</reference/atlas-search/delete-index/>` or :atlas:`API
22+
</reference/api/fts-indexes-delete-one/>`.
23+
24+
.. _mcli-atlas-search-index-delete-syntax:
25+
26+
Syntax
27+
------
28+
29+
.. code-block:: text
30+
31+
mongocli atlas cluster search|fts index delete <index-id>
32+
--clusterName <cluster-name>
33+
--force
34+
[ --profile|-P <profile-name> ]
35+
[ --projectId <project-ID> ]
36+
37+
.. include:: /includes/fact-command-line-help.rst
38+
39+
.. _mcli-atlas-search-index-delete-options:
40+
41+
Options
42+
-------
43+
44+
.. list-table::
45+
:header-rows: 1
46+
:widths: 20 10 60 10
47+
48+
* - Option
49+
- Type
50+
- Description
51+
- Required?
52+
53+
* - ``<index-id>``
54+
- string
55+
- Unique identifier of the |fts| index to delete.
56+
- yes
57+
58+
* - ``--clusterName``
59+
- string
60+
- Name of the cluster.
61+
- yes
62+
63+
* - ``--force``
64+
- flag
65+
- Flag that indicates that the |fts| index can
66+
be deleted without requiring confirmation.
67+
- no
68+
69+
* - ``--profile``, ``-P``
70+
- string
71+
- Name of the profile where the public and private keys for the project
72+
are set. If omitted, uses the {+default-profile+}. To learn more about
73+
creating a profile, see :ref:`mcli-configure`.
74+
- no
75+
76+
* - ``--projectId``
77+
- string
78+
- Unique identifier of the project where you want to delete the cluster.
79+
If omitted, uses the project ID in the profile or :ref:`environment
80+
variable <mcli-env-var>`.
81+
- no
82+
83+
.. _mcli-atlas-search-index-delete-output:
84+
85+
Output
86+
------
87+
88+
The command prints the following message to the terminal if the command
89+
succeeds. If the command returns errors, see :ref:`Troubleshooting
90+
<mcli-troubleshooting>` for recommended solutions.
91+
92+
.. code-block:: none
93+
:copyable: false
94+
95+
Index '<index-id>' deleted
96+
97+
.. _mcli-atlas-search-index-delete-egs:
98+
99+
Examples
100+
--------
101+
102+
The following examples use the ``mongocli atlas cluster search index delete``
103+
command to delete an |fts| index in the cluster named ``myTestCluster``.
104+
105+
Basic Example
106+
~~~~~~~~~~~~~
107+
108+
The following ``mongocli atlas cluster search index delete`` command deletes
109+
the |fts| index after prompting for a confirmation. It uses the
110+
{+default-profile+} for accessing the |service| project.
111+
112+
.. code-block:: text
113+
:copyable: false
114+
115+
mongocli atlas cluster search index delete 5f2099cd683fc55fbb30bef6 --clusterName myTestCluster
116+
Are you sure you want to delete: 5f2099cd683fc55fbb30bef6 Yes
117+
118+
The command prints the following to the terminal:
119+
120+
.. code-block:: text
121+
:copyable: false
122+
123+
Index '5f2099cd683fc55fbb30bef6' deleted
124+
125+
Force Example
126+
~~~~~~~~~~~~~
127+
128+
The following ``mongocli atlas cluster search index delete`` command deletes
129+
the |fts| index without requiring confirmation. It uses the {+default-profile+} for accessing the |service| project.
130+
131+
.. code-block:: text
132+
:copyable: false
133+
134+
mongocli atlas cluster search index delete 5f21d13ccbca3227d456bcc7 --clusterName myTestCluster --force
135+
136+
The command prints the following to the terminal:
137+
138+
.. code-block:: text
139+
:copyable: false
140+
141+
Index '5f21d13ccbca3227d456bcc7' deleted

0 commit comments

Comments
 (0)