|
| 1 | +.. _mcli-atlas-search-index-list-command: |
| 2 | + |
| 3 | +======================================== |
| 4 | +mongocli atlas cluster search index list |
| 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 list`` command lists all |fts| :atlas:`indexes |
| 16 | +</reference/atlas-search/index-definitions/>` for a specified cluster. You |
| 17 | +can also list |fts| :atlas:`indexes |
| 18 | +</reference/atlas-search/index-management/>` through the |service| UI or the |
| 19 | +:atlas:`API </reference/api/fts-indexes-get-all/>`. |
| 20 | + |
| 21 | +.. _mcli-atlas-search-index-list-syntax: |
| 22 | + |
| 23 | +Syntax |
| 24 | +------ |
| 25 | + |
| 26 | +.. code-block:: text |
| 27 | + |
| 28 | + mongocli atlas cluster search|fts index list|ls |
| 29 | + --clusterName <cluster-name> |
| 30 | + --db <database-name> |
| 31 | + --collection <collection-name> |
| 32 | + [ --profile|-P <profile-name> ] |
| 33 | + [ --projectId <project-ID> ] |
| 34 | + |
| 35 | +.. _mcli-atlas-search-index-list-options: |
| 36 | + |
| 37 | +Options |
| 38 | +------- |
| 39 | + |
| 40 | +.. list-table:: |
| 41 | + :header-rows: 1 |
| 42 | + :widths: 20 10 60 10 |
| 43 | + |
| 44 | + * - Option |
| 45 | + - Type |
| 46 | + - Description |
| 47 | + - Required? |
| 48 | + |
| 49 | + * - ``--clusterName`` |
| 50 | + - string |
| 51 | + - Name of the cluster. |
| 52 | + - yes |
| 53 | + |
| 54 | + * - ``--db`` |
| 55 | + - string |
| 56 | + - Name of the database that contains the collection. |
| 57 | + - yes |
| 58 | + |
| 59 | + * - ``--collection`` |
| 60 | + - string |
| 61 | + - Name of the collection for which to list |fts| indexes. |
| 62 | + - yes |
| 63 | + |
| 64 | + * - ``--profile``, ``-P`` |
| 65 | + - string |
| 66 | + - Name of the profile where the public and private keys for the project |
| 67 | + are set. If omitted, uses the {+default-profile+}. To learn more about |
| 68 | + creating a profile, see :ref:`mcli-configure`. |
| 69 | + - no |
| 70 | + |
| 71 | + * - ``--projectId`` |
| 72 | + - string |
| 73 | + - Unique identifier of the project where you want to create the cluster. |
| 74 | + If omitted, uses the project ID in the profile or :ref:`environment |
| 75 | + variable <mcli-env-var>`. |
| 76 | + - no |
| 77 | + |
| 78 | +.. _mcli-atlas-search-index-list-output: |
| 79 | + |
| 80 | +Output |
| 81 | +------ |
| 82 | + |
| 83 | +.. include:: /includes/command-output-intro.rst |
| 84 | + |
| 85 | +.. include:: /includes/atlas-search-index-output-fields.rst |
| 86 | + |
| 87 | +.. _mcli-atlas-search-index-list-egs: |
| 88 | + |
| 89 | +Example |
| 90 | +------- |
| 91 | + |
| 92 | +The following example uses the ``mongocli atlas cluster search index list`` |
| 93 | +command to list the |fts| indexes on the ``sample_mflix.movies`` collection |
| 94 | +in an |service| cluster named ``myTestCluster``. |
| 95 | + |
| 96 | +.. code-block:: text |
| 97 | + |
| 98 | + mongocli atlas cluster search index list --clusterName myTestCluster --db sample_mflix --collection movies --profile egAtlasProfile |
| 99 | + |
| 100 | +The previous command prints the following fields in |json| format to the |
| 101 | +terminal. To learn more about these fields, see |
| 102 | +:ref:`mcli-atlas-search-index-list-output`. |
| 103 | + |
| 104 | +.. code-block:: json |
| 105 | + :copyable: false |
| 106 | + |
| 107 | + [ |
| 108 | + { |
| 109 | + "analyzer": "lucene.standard", |
| 110 | + "collectionName": "movies", |
| 111 | + "database": "sample_mflix", |
| 112 | + "indexID": "5f1f40842f2ac35f49190c20", |
| 113 | + "mappings": { |
| 114 | + "dynamic": true |
| 115 | + }, |
| 116 | + "name": "dynamic", |
| 117 | + "searchAnalyzer": "lucene.standard" |
| 118 | + } |
| 119 | + ] |
0 commit comments