1. Packages
  2. Mongodbatlas Provider
  3. API Docs
  4. getSearchIndexes
MongoDB Atlas v3.30.0 published on Friday, Mar 21, 2025 by Pulumi

mongodbatlas.getSearchIndexes

Explore with Pulumi AI

# Data Source: mongodbatlas.getSearchIndexes

mongodbatlas.getSearchIndexes describes all search indexes. This represents search indexes that have been created.

NOTE: Groups and projects are synonymous terms. You may find groupId in the official documentation.

Example Usage

Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
import com.pulumi.mongodbatlas.inputs.GetSearchIndexesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var test = MongodbatlasFunctions.getSearchIndexes(GetSearchIndexesArgs.builder()
            .projectId("<PROJECT_ID>")
            .clusterName("<CLUSTER_NAME>")
            .databaseName("<DATABASE_NAME>")
            .collectionName("<COLLECTION_NAME>")
            .build());

    }
}
Copy
variables:
  test:
    fn::invoke:
      function: mongodbatlas:getSearchIndexes
      arguments:
        projectId: <PROJECT_ID>
        clusterName: <CLUSTER_NAME>
        databaseName: <DATABASE_NAME>
        collectionName: <COLLECTION_NAME>
Copy

Using getSearchIndexes

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getSearchIndexes(args: GetSearchIndexesArgs, opts?: InvokeOptions): Promise<GetSearchIndexesResult>
function getSearchIndexesOutput(args: GetSearchIndexesOutputArgs, opts?: InvokeOptions): Output<GetSearchIndexesResult>
Copy
def get_search_indexes(cluster_name: Optional[str] = None,
                       collection_name: Optional[str] = None,
                       database: Optional[str] = None,
                       project_id: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetSearchIndexesResult
def get_search_indexes_output(cluster_name: Optional[pulumi.Input[str]] = None,
                       collection_name: Optional[pulumi.Input[str]] = None,
                       database: Optional[pulumi.Input[str]] = None,
                       project_id: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetSearchIndexesResult]
Copy
func LookupSearchIndexes(ctx *Context, args *LookupSearchIndexesArgs, opts ...InvokeOption) (*LookupSearchIndexesResult, error)
func LookupSearchIndexesOutput(ctx *Context, args *LookupSearchIndexesOutputArgs, opts ...InvokeOption) LookupSearchIndexesResultOutput
Copy

> Note: This function is named LookupSearchIndexes in the Go SDK.

public static class GetSearchIndexes 
{
    public static Task<GetSearchIndexesResult> InvokeAsync(GetSearchIndexesArgs args, InvokeOptions? opts = null)
    public static Output<GetSearchIndexesResult> Invoke(GetSearchIndexesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetSearchIndexesResult> getSearchIndexes(GetSearchIndexesArgs args, InvokeOptions options)
public static Output<GetSearchIndexesResult> getSearchIndexes(GetSearchIndexesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: mongodbatlas:index/getSearchIndexes:getSearchIndexes
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ClusterName This property is required. string
Name of the cluster containing the collection with one or more Atlas Search indexes.
CollectionName This property is required. string
Name of the collection with one or more Atlas Search indexes.
Database This property is required. string
(Required) Name of the database the collection is in.
ProjectId This property is required. string
Unique identifier for the project that contains the specified cluster.
ClusterName This property is required. string
Name of the cluster containing the collection with one or more Atlas Search indexes.
CollectionName This property is required. string
Name of the collection with one or more Atlas Search indexes.
Database This property is required. string
(Required) Name of the database the collection is in.
ProjectId This property is required. string
Unique identifier for the project that contains the specified cluster.
clusterName This property is required. String
Name of the cluster containing the collection with one or more Atlas Search indexes.
collectionName This property is required. String
Name of the collection with one or more Atlas Search indexes.
database This property is required. String
(Required) Name of the database the collection is in.
projectId This property is required. String
Unique identifier for the project that contains the specified cluster.
clusterName This property is required. string
Name of the cluster containing the collection with one or more Atlas Search indexes.
collectionName This property is required. string
Name of the collection with one or more Atlas Search indexes.
database This property is required. string
(Required) Name of the database the collection is in.
projectId This property is required. string
Unique identifier for the project that contains the specified cluster.
cluster_name This property is required. str
Name of the cluster containing the collection with one or more Atlas Search indexes.
collection_name This property is required. str
Name of the collection with one or more Atlas Search indexes.
database This property is required. str
(Required) Name of the database the collection is in.
project_id This property is required. str
Unique identifier for the project that contains the specified cluster.
clusterName This property is required. String
Name of the cluster containing the collection with one or more Atlas Search indexes.
collectionName This property is required. String
Name of the collection with one or more Atlas Search indexes.
database This property is required. String
(Required) Name of the database the collection is in.
projectId This property is required. String
Unique identifier for the project that contains the specified cluster.

getSearchIndexes Result

The following output properties are available:

ClusterName string
CollectionName string
(Required) Name of the collection the index is on.
Database string
(Required) Name of the database the collection is in.
Id string
The provider-assigned unique ID for this managed resource.
ProjectId string
Results List<GetSearchIndexesResult>
A list where each represents a search index.
TotalCount int
Represents the total of the search indexes
ClusterName string
CollectionName string
(Required) Name of the collection the index is on.
Database string
(Required) Name of the database the collection is in.
Id string
The provider-assigned unique ID for this managed resource.
ProjectId string
Results []GetSearchIndexesResult
A list where each represents a search index.
TotalCount int
Represents the total of the search indexes
clusterName String
collectionName String
(Required) Name of the collection the index is on.
database String
(Required) Name of the database the collection is in.
id String
The provider-assigned unique ID for this managed resource.
projectId String
results List<GetSearchIndexesResult>
A list where each represents a search index.
totalCount Integer
Represents the total of the search indexes
clusterName string
collectionName string
(Required) Name of the collection the index is on.
database string
(Required) Name of the database the collection is in.
id string
The provider-assigned unique ID for this managed resource.
projectId string
results GetSearchIndexesResult[]
A list where each represents a search index.
totalCount number
Represents the total of the search indexes
cluster_name str
collection_name str
(Required) Name of the collection the index is on.
database str
(Required) Name of the database the collection is in.
id str
The provider-assigned unique ID for this managed resource.
project_id str
results Sequence[GetSearchIndexesResult]
A list where each represents a search index.
total_count int
Represents the total of the search indexes
clusterName String
collectionName String
(Required) Name of the collection the index is on.
database String
(Required) Name of the database the collection is in.
id String
The provider-assigned unique ID for this managed resource.
projectId String
results List<Property Map>
A list where each represents a search index.
totalCount Number
Represents the total of the search indexes

Supporting Types

GetSearchIndexesResult

Analyzer This property is required. string
Analyzer to use when creating the index.
Analyzers This property is required. string
Custom analyzers to use in this index (this is an array of objects).
ClusterName This property is required. string
Name of the cluster containing the collection with one or more Atlas Search indexes.
CollectionName This property is required. string
Name of the collection with one or more Atlas Search indexes.
Database This property is required. string
(Required) Name of the database the collection is in.
Fields This property is required. string
IndexId This property is required. string
The unique identifier of the Atlas Search index.
MappingsDynamic This property is required. bool
Flag indicating whether the index uses dynamic or static mappings.
MappingsFields This property is required. string
Object containing one or more field specifications.
Name This property is required. string
Name of the index.
ProjectId This property is required. string
Unique identifier for the project that contains the specified cluster.
SearchAnalyzer This property is required. string
Analyzer to use when searching the index.
Status This property is required. string
Current status of the index.
StoredSource This property is required. string
String that can be "true" (store all fields), "false" (default, don't store any field), or a JSON string that contains the list of fields to store (include) or not store (exclude) on Atlas Search. To learn more, see Stored Source Fields.
Synonyms This property is required. List<GetSearchIndexesResultSynonym>
Synonyms mapping definition to use in this index.

  • synonyms.#.name - Name of the synonym mapping definition.
  • synonyms.#.source_collection - Name of the source MongoDB collection for the synonyms.
  • synonyms.#.analyzer - Name of the analyzer to use with this synonym mapping.
Type This property is required. string
Analyzer This property is required. string
Analyzer to use when creating the index.
Analyzers This property is required. string
Custom analyzers to use in this index (this is an array of objects).
ClusterName This property is required. string
Name of the cluster containing the collection with one or more Atlas Search indexes.
CollectionName This property is required. string
Name of the collection with one or more Atlas Search indexes.
Database This property is required. string
(Required) Name of the database the collection is in.
Fields This property is required. string
IndexId This property is required. string
The unique identifier of the Atlas Search index.
MappingsDynamic This property is required. bool
Flag indicating whether the index uses dynamic or static mappings.
MappingsFields This property is required. string
Object containing one or more field specifications.
Name This property is required. string
Name of the index.
ProjectId This property is required. string
Unique identifier for the project that contains the specified cluster.
SearchAnalyzer This property is required. string
Analyzer to use when searching the index.
Status This property is required. string
Current status of the index.
StoredSource This property is required. string
String that can be "true" (store all fields), "false" (default, don't store any field), or a JSON string that contains the list of fields to store (include) or not store (exclude) on Atlas Search. To learn more, see Stored Source Fields.
Synonyms This property is required. []GetSearchIndexesResultSynonym
Synonyms mapping definition to use in this index.

  • synonyms.#.name - Name of the synonym mapping definition.
  • synonyms.#.source_collection - Name of the source MongoDB collection for the synonyms.
  • synonyms.#.analyzer - Name of the analyzer to use with this synonym mapping.
Type This property is required. string
analyzer This property is required. String
Analyzer to use when creating the index.
analyzers This property is required. String
Custom analyzers to use in this index (this is an array of objects).
clusterName This property is required. String
Name of the cluster containing the collection with one or more Atlas Search indexes.
collectionName This property is required. String
Name of the collection with one or more Atlas Search indexes.
database This property is required. String
(Required) Name of the database the collection is in.
fields This property is required. String
indexId This property is required. String
The unique identifier of the Atlas Search index.
mappingsDynamic This property is required. Boolean
Flag indicating whether the index uses dynamic or static mappings.
mappingsFields This property is required. String
Object containing one or more field specifications.
name This property is required. String
Name of the index.
projectId This property is required. String
Unique identifier for the project that contains the specified cluster.
searchAnalyzer This property is required. String
Analyzer to use when searching the index.
status This property is required. String
Current status of the index.
storedSource This property is required. String
String that can be "true" (store all fields), "false" (default, don't store any field), or a JSON string that contains the list of fields to store (include) or not store (exclude) on Atlas Search. To learn more, see Stored Source Fields.
synonyms This property is required. List<GetSearchIndexesResultSynonym>
Synonyms mapping definition to use in this index.

  • synonyms.#.name - Name of the synonym mapping definition.
  • synonyms.#.source_collection - Name of the source MongoDB collection for the synonyms.
  • synonyms.#.analyzer - Name of the analyzer to use with this synonym mapping.
type This property is required. String
analyzer This property is required. string
Analyzer to use when creating the index.
analyzers This property is required. string
Custom analyzers to use in this index (this is an array of objects).
clusterName This property is required. string
Name of the cluster containing the collection with one or more Atlas Search indexes.
collectionName This property is required. string
Name of the collection with one or more Atlas Search indexes.
database This property is required. string
(Required) Name of the database the collection is in.
fields This property is required. string
indexId This property is required. string
The unique identifier of the Atlas Search index.
mappingsDynamic This property is required. boolean
Flag indicating whether the index uses dynamic or static mappings.
mappingsFields This property is required. string
Object containing one or more field specifications.
name This property is required. string
Name of the index.
projectId This property is required. string
Unique identifier for the project that contains the specified cluster.
searchAnalyzer This property is required. string
Analyzer to use when searching the index.
status This property is required. string
Current status of the index.
storedSource This property is required. string
String that can be "true" (store all fields), "false" (default, don't store any field), or a JSON string that contains the list of fields to store (include) or not store (exclude) on Atlas Search. To learn more, see Stored Source Fields.
synonyms This property is required. GetSearchIndexesResultSynonym[]
Synonyms mapping definition to use in this index.

  • synonyms.#.name - Name of the synonym mapping definition.
  • synonyms.#.source_collection - Name of the source MongoDB collection for the synonyms.
  • synonyms.#.analyzer - Name of the analyzer to use with this synonym mapping.
type This property is required. string
analyzer This property is required. str
Analyzer to use when creating the index.
analyzers This property is required. str
Custom analyzers to use in this index (this is an array of objects).
cluster_name This property is required. str
Name of the cluster containing the collection with one or more Atlas Search indexes.
collection_name This property is required. str
Name of the collection with one or more Atlas Search indexes.
database This property is required. str
(Required) Name of the database the collection is in.
fields This property is required. str
index_id This property is required. str
The unique identifier of the Atlas Search index.
mappings_dynamic This property is required. bool
Flag indicating whether the index uses dynamic or static mappings.
mappings_fields This property is required. str
Object containing one or more field specifications.
name This property is required. str
Name of the index.
project_id This property is required. str
Unique identifier for the project that contains the specified cluster.
search_analyzer This property is required. str
Analyzer to use when searching the index.
status This property is required. str
Current status of the index.
stored_source This property is required. str
String that can be "true" (store all fields), "false" (default, don't store any field), or a JSON string that contains the list of fields to store (include) or not store (exclude) on Atlas Search. To learn more, see Stored Source Fields.
synonyms This property is required. Sequence[GetSearchIndexesResultSynonym]
Synonyms mapping definition to use in this index.

  • synonyms.#.name - Name of the synonym mapping definition.
  • synonyms.#.source_collection - Name of the source MongoDB collection for the synonyms.
  • synonyms.#.analyzer - Name of the analyzer to use with this synonym mapping.
type This property is required. str
analyzer This property is required. String
Analyzer to use when creating the index.
analyzers This property is required. String
Custom analyzers to use in this index (this is an array of objects).
clusterName This property is required. String
Name of the cluster containing the collection with one or more Atlas Search indexes.
collectionName This property is required. String
Name of the collection with one or more Atlas Search indexes.
database This property is required. String
(Required) Name of the database the collection is in.
fields This property is required. String
indexId This property is required. String
The unique identifier of the Atlas Search index.
mappingsDynamic This property is required. Boolean
Flag indicating whether the index uses dynamic or static mappings.
mappingsFields This property is required. String
Object containing one or more field specifications.
name This property is required. String
Name of the index.
projectId This property is required. String
Unique identifier for the project that contains the specified cluster.
searchAnalyzer This property is required. String
Analyzer to use when searching the index.
status This property is required. String
Current status of the index.
storedSource This property is required. String
String that can be "true" (store all fields), "false" (default, don't store any field), or a JSON string that contains the list of fields to store (include) or not store (exclude) on Atlas Search. To learn more, see Stored Source Fields.
synonyms This property is required. List<Property Map>
Synonyms mapping definition to use in this index.

  • synonyms.#.name - Name of the synonym mapping definition.
  • synonyms.#.source_collection - Name of the source MongoDB collection for the synonyms.
  • synonyms.#.analyzer - Name of the analyzer to use with this synonym mapping.
type This property is required. String

GetSearchIndexesResultSynonym

Analyzer This property is required. string
Analyzer to use when creating the index.
Name This property is required. string
Name of the index.
SourceCollection This property is required. string
Analyzer This property is required. string
Analyzer to use when creating the index.
Name This property is required. string
Name of the index.
SourceCollection This property is required. string
analyzer This property is required. String
Analyzer to use when creating the index.
name This property is required. String
Name of the index.
sourceCollection This property is required. String
analyzer This property is required. string
Analyzer to use when creating the index.
name This property is required. string
Name of the index.
sourceCollection This property is required. string
analyzer This property is required. str
Analyzer to use when creating the index.
name This property is required. str
Name of the index.
source_collection This property is required. str
analyzer This property is required. String
Analyzer to use when creating the index.
name This property is required. String
Name of the index.
sourceCollection This property is required. String

Package Details

Repository
MongoDB Atlas pulumi/pulumi-mongodbatlas
License
Apache-2.0
Notes
This Pulumi package is based on the mongodbatlas Terraform Provider.