1. Packages
  2. MongoDB Atlas
  3. API Docs
  4. SearchIndex
MongoDB Atlas v3.18.0 published on Thursday, Sep 12, 2024 by Pulumi

mongodbatlas.SearchIndex

Explore with Pulumi AI

mongodbatlas logo
MongoDB Atlas v3.18.0 published on Thursday, Sep 12, 2024 by Pulumi

    # Resource: mongodbatlas.SearchIndex

    mongodbatlas.SearchIndex provides a Search Index resource. This allows indexes to be created.

    Example Usage

    Basic search index

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const test_basic_search_index = new mongodbatlas.SearchIndex("test-basic-search-index", {
        name: "test-basic-search-index",
        projectId: "<PROJECT_ID>",
        clusterName: "<CLUSTER_NAME>",
        analyzer: "lucene.standard",
        collectionName: "collection_test",
        database: "database_test",
        mappingsDynamic: true,
        searchAnalyzer: "lucene.standard",
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    test_basic_search_index = mongodbatlas.SearchIndex("test-basic-search-index",
        name="test-basic-search-index",
        project_id="<PROJECT_ID>",
        cluster_name="<CLUSTER_NAME>",
        analyzer="lucene.standard",
        collection_name="collection_test",
        database="database_test",
        mappings_dynamic=True,
        search_analyzer="lucene.standard")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := mongodbatlas.NewSearchIndex(ctx, "test-basic-search-index", &mongodbatlas.SearchIndexArgs{
    			Name:            pulumi.String("test-basic-search-index"),
    			ProjectId:       pulumi.String("<PROJECT_ID>"),
    			ClusterName:     pulumi.String("<CLUSTER_NAME>"),
    			Analyzer:        pulumi.String("lucene.standard"),
    			CollectionName:  pulumi.String("collection_test"),
    			Database:        pulumi.String("database_test"),
    			MappingsDynamic: pulumi.Bool(true),
    			SearchAnalyzer:  pulumi.String("lucene.standard"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var test_basic_search_index = new Mongodbatlas.SearchIndex("test-basic-search-index", new()
        {
            Name = "test-basic-search-index",
            ProjectId = "<PROJECT_ID>",
            ClusterName = "<CLUSTER_NAME>",
            Analyzer = "lucene.standard",
            CollectionName = "collection_test",
            Database = "database_test",
            MappingsDynamic = true,
            SearchAnalyzer = "lucene.standard",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.SearchIndex;
    import com.pulumi.mongodbatlas.SearchIndexArgs;
    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) {
            var test_basic_search_index = new SearchIndex("test-basic-search-index", SearchIndexArgs.builder()
                .name("test-basic-search-index")
                .projectId("<PROJECT_ID>")
                .clusterName("<CLUSTER_NAME>")
                .analyzer("lucene.standard")
                .collectionName("collection_test")
                .database("database_test")
                .mappingsDynamic(true)
                .searchAnalyzer("lucene.standard")
                .build());
    
        }
    }
    
    resources:
      test-basic-search-index:
        type: mongodbatlas:SearchIndex
        properties:
          name: test-basic-search-index
          projectId: <PROJECT_ID>
          clusterName: <CLUSTER_NAME>
          analyzer: lucene.standard
          collectionName: collection_test
          database: database_test
          mappingsDynamic: true
          searchAnalyzer: lucene.standard
    

    Basic vector index

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const test_basic_search_vector = new mongodbatlas.SearchIndex("test-basic-search-vector", {
        projectId: "<PROJECT_ID>",
        clusterName: "<CLUSTER_NAME>",
        collectionName: "collection_test",
        database: "database_test",
        type: "vectorSearch",
        fields: `[{
          "type": "vector",
          "path": "plot_embedding",
          "numDimensions": 1536,
          "similarity": "euclidean"
    }]
    `,
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    test_basic_search_vector = mongodbatlas.SearchIndex("test-basic-search-vector",
        project_id="<PROJECT_ID>",
        cluster_name="<CLUSTER_NAME>",
        collection_name="collection_test",
        database="database_test",
        type="vectorSearch",
        fields="""[{
          "type": "vector",
          "path": "plot_embedding",
          "numDimensions": 1536,
          "similarity": "euclidean"
    }]
    """)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := mongodbatlas.NewSearchIndex(ctx, "test-basic-search-vector", &mongodbatlas.SearchIndexArgs{
    			ProjectId:      pulumi.String("<PROJECT_ID>"),
    			ClusterName:    pulumi.String("<CLUSTER_NAME>"),
    			CollectionName: pulumi.String("collection_test"),
    			Database:       pulumi.String("database_test"),
    			Type:           pulumi.String("vectorSearch"),
    			Fields: pulumi.String(`[{
          "type": "vector",
          "path": "plot_embedding",
          "numDimensions": 1536,
          "similarity": "euclidean"
    }]
    `),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var test_basic_search_vector = new Mongodbatlas.SearchIndex("test-basic-search-vector", new()
        {
            ProjectId = "<PROJECT_ID>",
            ClusterName = "<CLUSTER_NAME>",
            CollectionName = "collection_test",
            Database = "database_test",
            Type = "vectorSearch",
            Fields = @"[{
          ""type"": ""vector"",
          ""path"": ""plot_embedding"",
          ""numDimensions"": 1536,
          ""similarity"": ""euclidean""
    }]
    ",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.SearchIndex;
    import com.pulumi.mongodbatlas.SearchIndexArgs;
    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) {
            var test_basic_search_vector = new SearchIndex("test-basic-search-vector", SearchIndexArgs.builder()
                .projectId("<PROJECT_ID>")
                .clusterName("<CLUSTER_NAME>")
                .collectionName("collection_test")
                .database("database_test")
                .type("vectorSearch")
                .fields("""
    [{
          "type": "vector",
          "path": "plot_embedding",
          "numDimensions": 1536,
          "similarity": "euclidean"
    }]
                """)
                .build());
    
        }
    }
    
    resources:
      test-basic-search-vector:
        type: mongodbatlas:SearchIndex
        properties:
          projectId: <PROJECT_ID>
          clusterName: <CLUSTER_NAME>
          collectionName: collection_test
          database: database_test
          type: vectorSearch
          fields: |
            [{
                  "type": "vector",
                  "path": "plot_embedding",
                  "numDimensions": 1536,
                  "similarity": "euclidean"
            }]        
    

    Advanced search index (with custom analyzers)

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const test_advanced_search_index = new mongodbatlas.SearchIndex("test-advanced-search-index", {
        projectId: "<PROJECT_ID>",
        clusterName: "<CLUSTER_NAME>",
        analyzer: "lucene.standard",
        collectionName: "collection_test",
        database: "database_test",
        mappingsDynamic: false,
        mappingsFields: `{
          "address": {
            "type": "document",
            "fields": {
              "city": {
                "type": "string",
                "analyzer": "lucene.simple",
                "ignoreAbove": 255
              },
              "state": {
                "type": "string",
                "analyzer": "lucene.english"
              }
            }
          },
          "company": {
            "type": "string",
            "analyzer": "lucene.whitespace",
            "multi": {
              "mySecondaryAnalyzer": {
                "type": "string",
                "analyzer": "lucene.french"
              }
            }
          },
          "employees": {
            "type": "string",
            "analyzer": "lucene.standard"
          }
    }
    `,
        name: "test-advanced-search-index",
        searchAnalyzer: "lucene.standard",
        analyzers: ` [{
     "name": "index_analyzer_test_name",
     "charFilters": [{
    "type": "mapping",
    "mappings": {"\\\\" : "/"}
       \x09}],
     "tokenizer": {
     "type": "nGram",
     "minGram": 2,
     "maxGram": 5
    \x09},
     "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
       \x09}]
     }]
    `,
        synonyms: [{
            analyzer: "lucene.simple",
            name: "synonym_test",
            sourceCollection: "collection_test",
        }],
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    test_advanced_search_index = mongodbatlas.SearchIndex("test-advanced-search-index",
        project_id="<PROJECT_ID>",
        cluster_name="<CLUSTER_NAME>",
        analyzer="lucene.standard",
        collection_name="collection_test",
        database="database_test",
        mappings_dynamic=False,
        mappings_fields="""{
          "address": {
            "type": "document",
            "fields": {
              "city": {
                "type": "string",
                "analyzer": "lucene.simple",
                "ignoreAbove": 255
              },
              "state": {
                "type": "string",
                "analyzer": "lucene.english"
              }
            }
          },
          "company": {
            "type": "string",
            "analyzer": "lucene.whitespace",
            "multi": {
              "mySecondaryAnalyzer": {
                "type": "string",
                "analyzer": "lucene.french"
              }
            }
          },
          "employees": {
            "type": "string",
            "analyzer": "lucene.standard"
          }
    }
    """,
        name="test-advanced-search-index",
        search_analyzer="lucene.standard",
        analyzers=""" [{
     "name": "index_analyzer_test_name",
     "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
       \x09}],
     "tokenizer": {
     "type": "nGram",
     "minGram": 2,
     "maxGram": 5
    \x09},
     "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
       \x09}]
     }]
    """,
        synonyms=[{
            "analyzer": "lucene.simple",
            "name": "synonym_test",
            "source_collection": "collection_test",
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := mongodbatlas.NewSearchIndex(ctx, "test-advanced-search-index", &mongodbatlas.SearchIndexArgs{
    			ProjectId:       pulumi.String("<PROJECT_ID>"),
    			ClusterName:     pulumi.String("<CLUSTER_NAME>"),
    			Analyzer:        pulumi.String("lucene.standard"),
    			CollectionName:  pulumi.String("collection_test"),
    			Database:        pulumi.String("database_test"),
    			MappingsDynamic: pulumi.Bool(false),
    			MappingsFields: pulumi.String(`{
          "address": {
            "type": "document",
            "fields": {
              "city": {
                "type": "string",
                "analyzer": "lucene.simple",
                "ignoreAbove": 255
              },
              "state": {
                "type": "string",
                "analyzer": "lucene.english"
              }
            }
          },
          "company": {
            "type": "string",
            "analyzer": "lucene.whitespace",
            "multi": {
              "mySecondaryAnalyzer": {
                "type": "string",
                "analyzer": "lucene.french"
              }
            }
          },
          "employees": {
            "type": "string",
            "analyzer": "lucene.standard"
          }
    }
    `),
    			Name:           pulumi.String("test-advanced-search-index"),
    			SearchAnalyzer: pulumi.String("lucene.standard"),
    			Analyzers: pulumi.String(` [{
     "name": "index_analyzer_test_name",
     "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
       	}],
     "tokenizer": {
     "type": "nGram",
     "minGram": 2,
     "maxGram": 5
    	},
     "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
       	}]
     }]
    `),
    			Synonyms: mongodbatlas.SearchIndexSynonymArray{
    				&mongodbatlas.SearchIndexSynonymArgs{
    					Analyzer:         pulumi.String("lucene.simple"),
    					Name:             pulumi.String("synonym_test"),
    					SourceCollection: pulumi.String("collection_test"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var test_advanced_search_index = new Mongodbatlas.SearchIndex("test-advanced-search-index", new()
        {
            ProjectId = "<PROJECT_ID>",
            ClusterName = "<CLUSTER_NAME>",
            Analyzer = "lucene.standard",
            CollectionName = "collection_test",
            Database = "database_test",
            MappingsDynamic = false,
            MappingsFields = @"{
          ""address"": {
            ""type"": ""document"",
            ""fields"": {
              ""city"": {
                ""type"": ""string"",
                ""analyzer"": ""lucene.simple"",
                ""ignoreAbove"": 255
              },
              ""state"": {
                ""type"": ""string"",
                ""analyzer"": ""lucene.english""
              }
            }
          },
          ""company"": {
            ""type"": ""string"",
            ""analyzer"": ""lucene.whitespace"",
            ""multi"": {
              ""mySecondaryAnalyzer"": {
                ""type"": ""string"",
                ""analyzer"": ""lucene.french""
              }
            }
          },
          ""employees"": {
            ""type"": ""string"",
            ""analyzer"": ""lucene.standard""
          }
    }
    ",
            Name = "test-advanced-search-index",
            SearchAnalyzer = "lucene.standard",
            Analyzers = @" [{
     ""name"": ""index_analyzer_test_name"",
     ""charFilters"": [{
    ""type"": ""mapping"",
    ""mappings"": {""\\"" : ""/""}
       	}],
     ""tokenizer"": {
     ""type"": ""nGram"",
     ""minGram"": 2,
     ""maxGram"": 5
    	},
     ""tokenFilters"": [{
    ""type"": ""length"",
    ""min"": 20,
    ""max"": 33
       	}]
     }]
    ",
            Synonyms = new[]
            {
                new Mongodbatlas.Inputs.SearchIndexSynonymArgs
                {
                    Analyzer = "lucene.simple",
                    Name = "synonym_test",
                    SourceCollection = "collection_test",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.SearchIndex;
    import com.pulumi.mongodbatlas.SearchIndexArgs;
    import com.pulumi.mongodbatlas.inputs.SearchIndexSynonymArgs;
    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) {
            var test_advanced_search_index = new SearchIndex("test-advanced-search-index", SearchIndexArgs.builder()
                .projectId("<PROJECT_ID>")
                .clusterName("<CLUSTER_NAME>")
                .analyzer("lucene.standard")
                .collectionName("collection_test")
                .database("database_test")
                .mappingsDynamic(false)
                .mappingsFields("""
    {
          "address": {
            "type": "document",
            "fields": {
              "city": {
                "type": "string",
                "analyzer": "lucene.simple",
                "ignoreAbove": 255
              },
              "state": {
                "type": "string",
                "analyzer": "lucene.english"
              }
            }
          },
          "company": {
            "type": "string",
            "analyzer": "lucene.whitespace",
            "multi": {
              "mySecondaryAnalyzer": {
                "type": "string",
                "analyzer": "lucene.french"
              }
            }
          },
          "employees": {
            "type": "string",
            "analyzer": "lucene.standard"
          }
    }
                """)
                .name("test-advanced-search-index")
                .searchAnalyzer("lucene.standard")
                .analyzers("""
     [{
     "name": "index_analyzer_test_name",
     "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
       	}],
     "tokenizer": {
     "type": "nGram",
     "minGram": 2,
     "maxGram": 5
    	},
     "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
       	}]
     }]
                """)
                .synonyms(SearchIndexSynonymArgs.builder()
                    .analyzer("lucene.simple")
                    .name("synonym_test")
                    .sourceCollection("collection_test")
                    .build())
                .build());
    
        }
    }
    
    resources:
      test-advanced-search-index:
        type: mongodbatlas:SearchIndex
        properties:
          projectId: <PROJECT_ID>
          clusterName: <CLUSTER_NAME>
          analyzer: lucene.standard
          collectionName: collection_test
          database: database_test
          mappingsDynamic: false
          mappingsFields: |
            {
                  "address": {
                    "type": "document",
                    "fields": {
                      "city": {
                        "type": "string",
                        "analyzer": "lucene.simple",
                        "ignoreAbove": 255
                      },
                      "state": {
                        "type": "string",
                        "analyzer": "lucene.english"
                      }
                    }
                  },
                  "company": {
                    "type": "string",
                    "analyzer": "lucene.whitespace",
                    "multi": {
                      "mySecondaryAnalyzer": {
                        "type": "string",
                        "analyzer": "lucene.french"
                      }
                    }
                  },
                  "employees": {
                    "type": "string",
                    "analyzer": "lucene.standard"
                  }
            }        
          name: test-advanced-search-index
          searchAnalyzer: lucene.standard
          analyzers: |2
             [{
             "name": "index_analyzer_test_name",
             "charFilters": [{
            "type": "mapping",
            "mappings": {"\\" : "/"}
               	}],
             "tokenizer": {
             "type": "nGram",
             "minGram": 2,
             "maxGram": 5
            	},
             "tokenFilters": [{
            "type": "length",
            "min": 20,
            "max": 33
               	}]
             }]
          synonyms:
            - analyzer: lucene.simple
              name: synonym_test
              sourceCollection: collection_test
    

    Create SearchIndex Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SearchIndex(name: string, args: SearchIndexArgs, opts?: CustomResourceOptions);
    @overload
    def SearchIndex(resource_name: str,
                    args: SearchIndexArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def SearchIndex(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    project_id: Optional[str] = None,
                    database: Optional[str] = None,
                    cluster_name: Optional[str] = None,
                    collection_name: Optional[str] = None,
                    name: Optional[str] = None,
                    fields: Optional[str] = None,
                    analyzers: Optional[str] = None,
                    mappings_fields: Optional[str] = None,
                    mappings_dynamic: Optional[bool] = None,
                    analyzer: Optional[str] = None,
                    search_analyzer: Optional[str] = None,
                    stored_source: Optional[str] = None,
                    synonyms: Optional[Sequence[SearchIndexSynonymArgs]] = None,
                    type: Optional[str] = None,
                    wait_for_index_build_completion: Optional[bool] = None)
    func NewSearchIndex(ctx *Context, name string, args SearchIndexArgs, opts ...ResourceOption) (*SearchIndex, error)
    public SearchIndex(string name, SearchIndexArgs args, CustomResourceOptions? opts = null)
    public SearchIndex(String name, SearchIndexArgs args)
    public SearchIndex(String name, SearchIndexArgs args, CustomResourceOptions options)
    
    type: mongodbatlas:SearchIndex
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SearchIndexArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SearchIndexArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SearchIndexArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SearchIndexArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SearchIndexArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var searchIndexResource = new Mongodbatlas.SearchIndex("searchIndexResource", new()
    {
        ProjectId = "string",
        Database = "string",
        ClusterName = "string",
        CollectionName = "string",
        Name = "string",
        Fields = "string",
        Analyzers = "string",
        MappingsFields = "string",
        MappingsDynamic = false,
        Analyzer = "string",
        SearchAnalyzer = "string",
        StoredSource = "string",
        Synonyms = new[]
        {
            new Mongodbatlas.Inputs.SearchIndexSynonymArgs
            {
                Analyzer = "string",
                Name = "string",
                SourceCollection = "string",
            },
        },
        Type = "string",
        WaitForIndexBuildCompletion = false,
    });
    
    example, err := mongodbatlas.NewSearchIndex(ctx, "searchIndexResource", &mongodbatlas.SearchIndexArgs{
    	ProjectId:       pulumi.String("string"),
    	Database:        pulumi.String("string"),
    	ClusterName:     pulumi.String("string"),
    	CollectionName:  pulumi.String("string"),
    	Name:            pulumi.String("string"),
    	Fields:          pulumi.String("string"),
    	Analyzers:       pulumi.String("string"),
    	MappingsFields:  pulumi.String("string"),
    	MappingsDynamic: pulumi.Bool(false),
    	Analyzer:        pulumi.String("string"),
    	SearchAnalyzer:  pulumi.String("string"),
    	StoredSource:    pulumi.String("string"),
    	Synonyms: mongodbatlas.SearchIndexSynonymArray{
    		&mongodbatlas.SearchIndexSynonymArgs{
    			Analyzer:         pulumi.String("string"),
    			Name:             pulumi.String("string"),
    			SourceCollection: pulumi.String("string"),
    		},
    	},
    	Type:                        pulumi.String("string"),
    	WaitForIndexBuildCompletion: pulumi.Bool(false),
    })
    
    var searchIndexResource = new SearchIndex("searchIndexResource", SearchIndexArgs.builder()
        .projectId("string")
        .database("string")
        .clusterName("string")
        .collectionName("string")
        .name("string")
        .fields("string")
        .analyzers("string")
        .mappingsFields("string")
        .mappingsDynamic(false)
        .analyzer("string")
        .searchAnalyzer("string")
        .storedSource("string")
        .synonyms(SearchIndexSynonymArgs.builder()
            .analyzer("string")
            .name("string")
            .sourceCollection("string")
            .build())
        .type("string")
        .waitForIndexBuildCompletion(false)
        .build());
    
    search_index_resource = mongodbatlas.SearchIndex("searchIndexResource",
        project_id="string",
        database="string",
        cluster_name="string",
        collection_name="string",
        name="string",
        fields="string",
        analyzers="string",
        mappings_fields="string",
        mappings_dynamic=False,
        analyzer="string",
        search_analyzer="string",
        stored_source="string",
        synonyms=[mongodbatlas.SearchIndexSynonymArgs(
            analyzer="string",
            name="string",
            source_collection="string",
        )],
        type="string",
        wait_for_index_build_completion=False)
    
    const searchIndexResource = new mongodbatlas.SearchIndex("searchIndexResource", {
        projectId: "string",
        database: "string",
        clusterName: "string",
        collectionName: "string",
        name: "string",
        fields: "string",
        analyzers: "string",
        mappingsFields: "string",
        mappingsDynamic: false,
        analyzer: "string",
        searchAnalyzer: "string",
        storedSource: "string",
        synonyms: [{
            analyzer: "string",
            name: "string",
            sourceCollection: "string",
        }],
        type: "string",
        waitForIndexBuildCompletion: false,
    });
    
    type: mongodbatlas:SearchIndex
    properties:
        analyzer: string
        analyzers: string
        clusterName: string
        collectionName: string
        database: string
        fields: string
        mappingsDynamic: false
        mappingsFields: string
        name: string
        projectId: string
        searchAnalyzer: string
        storedSource: string
        synonyms:
            - analyzer: string
              name: string
              sourceCollection: string
        type: string
        waitForIndexBuildCompletion: false
    

    SearchIndex Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The SearchIndex resource accepts the following input properties:

    ClusterName string
    The name of the cluster where you want to create the search index within.
    CollectionName string
    Name of the collection the index is on.
    Database string
    Name of the database the collection is in.
    ProjectId string
    The ID of the organization or project you want to create the search index within.
    Analyzer string
    Analyzer to use when creating the index. Defaults to lucene.standard
    Analyzers string
    Custom analyzers to use in this index. This is an array of JSON objects.

    analyzers = <<-EOF
    [{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    EOF
    
    Fields string
    Array of Fields to configure this vectorSearch index. It is mandatory for vector searches and it must contain at least one vector type field. This field needs to be a JSON string in order to be decoded correctly.
    MappingsDynamic bool
    Indicates whether the search index uses dynamic or static mapping. For dynamic mapping, set the value to true. For static mapping, specify the fields to index using mappings_fields
    MappingsFields string
    attribute is required in search indexes when mappings_dynamic is false. This field needs to be a JSON string in order to be decoded correctly.
    Name string
    The name of the search index you want to create.
    SearchAnalyzer string
    Analyzer to use when searching the index. Defaults to lucene.standard
    StoredSource 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 List<SearchIndexSynonym>
    Synonyms mapping definition to use in this index.
    Type string
    Type of index: search or vectorSearch. Default type is search.
    WaitForIndexBuildCompletion bool
    ClusterName string
    The name of the cluster where you want to create the search index within.
    CollectionName string
    Name of the collection the index is on.
    Database string
    Name of the database the collection is in.
    ProjectId string
    The ID of the organization or project you want to create the search index within.
    Analyzer string
    Analyzer to use when creating the index. Defaults to lucene.standard
    Analyzers string
    Custom analyzers to use in this index. This is an array of JSON objects.

    analyzers = <<-EOF
    [{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    EOF
    
    Fields string
    Array of Fields to configure this vectorSearch index. It is mandatory for vector searches and it must contain at least one vector type field. This field needs to be a JSON string in order to be decoded correctly.
    MappingsDynamic bool
    Indicates whether the search index uses dynamic or static mapping. For dynamic mapping, set the value to true. For static mapping, specify the fields to index using mappings_fields
    MappingsFields string
    attribute is required in search indexes when mappings_dynamic is false. This field needs to be a JSON string in order to be decoded correctly.
    Name string
    The name of the search index you want to create.
    SearchAnalyzer string
    Analyzer to use when searching the index. Defaults to lucene.standard
    StoredSource 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 []SearchIndexSynonymArgs
    Synonyms mapping definition to use in this index.
    Type string
    Type of index: search or vectorSearch. Default type is search.
    WaitForIndexBuildCompletion bool
    clusterName String
    The name of the cluster where you want to create the search index within.
    collectionName String
    Name of the collection the index is on.
    database String
    Name of the database the collection is in.
    projectId String
    The ID of the organization or project you want to create the search index within.
    analyzer String
    Analyzer to use when creating the index. Defaults to lucene.standard
    analyzers String
    Custom analyzers to use in this index. This is an array of JSON objects.

    analyzers = <<-EOF
    [{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    EOF
    
    fields String
    Array of Fields to configure this vectorSearch index. It is mandatory for vector searches and it must contain at least one vector type field. This field needs to be a JSON string in order to be decoded correctly.
    mappingsDynamic Boolean
    Indicates whether the search index uses dynamic or static mapping. For dynamic mapping, set the value to true. For static mapping, specify the fields to index using mappings_fields
    mappingsFields String
    attribute is required in search indexes when mappings_dynamic is false. This field needs to be a JSON string in order to be decoded correctly.
    name String
    The name of the search index you want to create.
    searchAnalyzer String
    Analyzer to use when searching the index. Defaults to lucene.standard
    storedSource 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 List<SearchIndexSynonym>
    Synonyms mapping definition to use in this index.
    type String
    Type of index: search or vectorSearch. Default type is search.
    waitForIndexBuildCompletion Boolean
    clusterName string
    The name of the cluster where you want to create the search index within.
    collectionName string
    Name of the collection the index is on.
    database string
    Name of the database the collection is in.
    projectId string
    The ID of the organization or project you want to create the search index within.
    analyzer string
    Analyzer to use when creating the index. Defaults to lucene.standard
    analyzers string
    Custom analyzers to use in this index. This is an array of JSON objects.

    analyzers = <<-EOF
    [{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    EOF
    
    fields string
    Array of Fields to configure this vectorSearch index. It is mandatory for vector searches and it must contain at least one vector type field. This field needs to be a JSON string in order to be decoded correctly.
    mappingsDynamic boolean
    Indicates whether the search index uses dynamic or static mapping. For dynamic mapping, set the value to true. For static mapping, specify the fields to index using mappings_fields
    mappingsFields string
    attribute is required in search indexes when mappings_dynamic is false. This field needs to be a JSON string in order to be decoded correctly.
    name string
    The name of the search index you want to create.
    searchAnalyzer string
    Analyzer to use when searching the index. Defaults to lucene.standard
    storedSource 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 SearchIndexSynonym[]
    Synonyms mapping definition to use in this index.
    type string
    Type of index: search or vectorSearch. Default type is search.
    waitForIndexBuildCompletion boolean
    cluster_name str
    The name of the cluster where you want to create the search index within.
    collection_name str
    Name of the collection the index is on.
    database str
    Name of the database the collection is in.
    project_id str
    The ID of the organization or project you want to create the search index within.
    analyzer str
    Analyzer to use when creating the index. Defaults to lucene.standard
    analyzers str
    Custom analyzers to use in this index. This is an array of JSON objects.

    analyzers = <<-EOF
    [{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    EOF
    
    fields str
    Array of Fields to configure this vectorSearch index. It is mandatory for vector searches and it must contain at least one vector type field. This field needs to be a JSON string in order to be decoded correctly.
    mappings_dynamic bool
    Indicates whether the search index uses dynamic or static mapping. For dynamic mapping, set the value to true. For static mapping, specify the fields to index using mappings_fields
    mappings_fields str
    attribute is required in search indexes when mappings_dynamic is false. This field needs to be a JSON string in order to be decoded correctly.
    name str
    The name of the search index you want to create.
    search_analyzer str
    Analyzer to use when searching the index. Defaults to lucene.standard
    stored_source 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 Sequence[SearchIndexSynonymArgs]
    Synonyms mapping definition to use in this index.
    type str
    Type of index: search or vectorSearch. Default type is search.
    wait_for_index_build_completion bool
    clusterName String
    The name of the cluster where you want to create the search index within.
    collectionName String
    Name of the collection the index is on.
    database String
    Name of the database the collection is in.
    projectId String
    The ID of the organization or project you want to create the search index within.
    analyzer String
    Analyzer to use when creating the index. Defaults to lucene.standard
    analyzers String
    Custom analyzers to use in this index. This is an array of JSON objects.

    analyzers = <<-EOF
    [{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    EOF
    
    fields String
    Array of Fields to configure this vectorSearch index. It is mandatory for vector searches and it must contain at least one vector type field. This field needs to be a JSON string in order to be decoded correctly.
    mappingsDynamic Boolean
    Indicates whether the search index uses dynamic or static mapping. For dynamic mapping, set the value to true. For static mapping, specify the fields to index using mappings_fields
    mappingsFields String
    attribute is required in search indexes when mappings_dynamic is false. This field needs to be a JSON string in order to be decoded correctly.
    name String
    The name of the search index you want to create.
    searchAnalyzer String
    Analyzer to use when searching the index. Defaults to lucene.standard
    storedSource 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 List<Property Map>
    Synonyms mapping definition to use in this index.
    type String
    Type of index: search or vectorSearch. Default type is search.
    waitForIndexBuildCompletion Boolean

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SearchIndex resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    IndexId string
    The unique identifier of the Atlas Search index.
    Status string
    Current status of the index.
    Id string
    The provider-assigned unique ID for this managed resource.
    IndexId string
    The unique identifier of the Atlas Search index.
    Status string
    Current status of the index.
    id String
    The provider-assigned unique ID for this managed resource.
    indexId String
    The unique identifier of the Atlas Search index.
    status String
    Current status of the index.
    id string
    The provider-assigned unique ID for this managed resource.
    indexId string
    The unique identifier of the Atlas Search index.
    status string
    Current status of the index.
    id str
    The provider-assigned unique ID for this managed resource.
    index_id str
    The unique identifier of the Atlas Search index.
    status str
    Current status of the index.
    id String
    The provider-assigned unique ID for this managed resource.
    indexId String
    The unique identifier of the Atlas Search index.
    status String
    Current status of the index.

    Look up Existing SearchIndex Resource

    Get an existing SearchIndex resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SearchIndexState, opts?: CustomResourceOptions): SearchIndex
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            analyzer: Optional[str] = None,
            analyzers: Optional[str] = None,
            cluster_name: Optional[str] = None,
            collection_name: Optional[str] = None,
            database: Optional[str] = None,
            fields: Optional[str] = None,
            index_id: Optional[str] = None,
            mappings_dynamic: Optional[bool] = None,
            mappings_fields: Optional[str] = None,
            name: Optional[str] = None,
            project_id: Optional[str] = None,
            search_analyzer: Optional[str] = None,
            status: Optional[str] = None,
            stored_source: Optional[str] = None,
            synonyms: Optional[Sequence[SearchIndexSynonymArgs]] = None,
            type: Optional[str] = None,
            wait_for_index_build_completion: Optional[bool] = None) -> SearchIndex
    func GetSearchIndex(ctx *Context, name string, id IDInput, state *SearchIndexState, opts ...ResourceOption) (*SearchIndex, error)
    public static SearchIndex Get(string name, Input<string> id, SearchIndexState? state, CustomResourceOptions? opts = null)
    public static SearchIndex get(String name, Output<String> id, SearchIndexState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Analyzer string
    Analyzer to use when creating the index. Defaults to lucene.standard
    Analyzers string
    Custom analyzers to use in this index. This is an array of JSON objects.

    analyzers = <<-EOF
    [{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    EOF
    
    ClusterName string
    The name of the cluster where you want to create the search index within.
    CollectionName string
    Name of the collection the index is on.
    Database string
    Name of the database the collection is in.
    Fields string
    Array of Fields to configure this vectorSearch index. It is mandatory for vector searches and it must contain at least one vector type field. This field needs to be a JSON string in order to be decoded correctly.
    IndexId string
    The unique identifier of the Atlas Search index.
    MappingsDynamic bool
    Indicates whether the search index uses dynamic or static mapping. For dynamic mapping, set the value to true. For static mapping, specify the fields to index using mappings_fields
    MappingsFields string
    attribute is required in search indexes when mappings_dynamic is false. This field needs to be a JSON string in order to be decoded correctly.
    Name string
    The name of the search index you want to create.
    ProjectId string
    The ID of the organization or project you want to create the search index within.
    SearchAnalyzer string
    Analyzer to use when searching the index. Defaults to lucene.standard
    Status string
    Current status of the index.
    StoredSource 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 List<SearchIndexSynonym>
    Synonyms mapping definition to use in this index.
    Type string
    Type of index: search or vectorSearch. Default type is search.
    WaitForIndexBuildCompletion bool
    Analyzer string
    Analyzer to use when creating the index. Defaults to lucene.standard
    Analyzers string
    Custom analyzers to use in this index. This is an array of JSON objects.

    analyzers = <<-EOF
    [{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    EOF
    
    ClusterName string
    The name of the cluster where you want to create the search index within.
    CollectionName string
    Name of the collection the index is on.
    Database string
    Name of the database the collection is in.
    Fields string
    Array of Fields to configure this vectorSearch index. It is mandatory for vector searches and it must contain at least one vector type field. This field needs to be a JSON string in order to be decoded correctly.
    IndexId string
    The unique identifier of the Atlas Search index.
    MappingsDynamic bool
    Indicates whether the search index uses dynamic or static mapping. For dynamic mapping, set the value to true. For static mapping, specify the fields to index using mappings_fields
    MappingsFields string
    attribute is required in search indexes when mappings_dynamic is false. This field needs to be a JSON string in order to be decoded correctly.
    Name string
    The name of the search index you want to create.
    ProjectId string
    The ID of the organization or project you want to create the search index within.
    SearchAnalyzer string
    Analyzer to use when searching the index. Defaults to lucene.standard
    Status string
    Current status of the index.
    StoredSource 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 []SearchIndexSynonymArgs
    Synonyms mapping definition to use in this index.
    Type string
    Type of index: search or vectorSearch. Default type is search.
    WaitForIndexBuildCompletion bool
    analyzer String
    Analyzer to use when creating the index. Defaults to lucene.standard
    analyzers String
    Custom analyzers to use in this index. This is an array of JSON objects.

    analyzers = <<-EOF
    [{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    EOF
    
    clusterName String
    The name of the cluster where you want to create the search index within.
    collectionName String
    Name of the collection the index is on.
    database String
    Name of the database the collection is in.
    fields String
    Array of Fields to configure this vectorSearch index. It is mandatory for vector searches and it must contain at least one vector type field. This field needs to be a JSON string in order to be decoded correctly.
    indexId String
    The unique identifier of the Atlas Search index.
    mappingsDynamic Boolean
    Indicates whether the search index uses dynamic or static mapping. For dynamic mapping, set the value to true. For static mapping, specify the fields to index using mappings_fields
    mappingsFields String
    attribute is required in search indexes when mappings_dynamic is false. This field needs to be a JSON string in order to be decoded correctly.
    name String
    The name of the search index you want to create.
    projectId String
    The ID of the organization or project you want to create the search index within.
    searchAnalyzer String
    Analyzer to use when searching the index. Defaults to lucene.standard
    status String
    Current status of the index.
    storedSource 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 List<SearchIndexSynonym>
    Synonyms mapping definition to use in this index.
    type String
    Type of index: search or vectorSearch. Default type is search.
    waitForIndexBuildCompletion Boolean
    analyzer string
    Analyzer to use when creating the index. Defaults to lucene.standard
    analyzers string
    Custom analyzers to use in this index. This is an array of JSON objects.

    analyzers = <<-EOF
    [{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    EOF
    
    clusterName string
    The name of the cluster where you want to create the search index within.
    collectionName string
    Name of the collection the index is on.
    database string
    Name of the database the collection is in.
    fields string
    Array of Fields to configure this vectorSearch index. It is mandatory for vector searches and it must contain at least one vector type field. This field needs to be a JSON string in order to be decoded correctly.
    indexId string
    The unique identifier of the Atlas Search index.
    mappingsDynamic boolean
    Indicates whether the search index uses dynamic or static mapping. For dynamic mapping, set the value to true. For static mapping, specify the fields to index using mappings_fields
    mappingsFields string
    attribute is required in search indexes when mappings_dynamic is false. This field needs to be a JSON string in order to be decoded correctly.
    name string
    The name of the search index you want to create.
    projectId string
    The ID of the organization or project you want to create the search index within.
    searchAnalyzer string
    Analyzer to use when searching the index. Defaults to lucene.standard
    status string
    Current status of the index.
    storedSource 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 SearchIndexSynonym[]
    Synonyms mapping definition to use in this index.
    type string
    Type of index: search or vectorSearch. Default type is search.
    waitForIndexBuildCompletion boolean
    analyzer str
    Analyzer to use when creating the index. Defaults to lucene.standard
    analyzers str
    Custom analyzers to use in this index. This is an array of JSON objects.

    analyzers = <<-EOF
    [{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    EOF
    
    cluster_name str
    The name of the cluster where you want to create the search index within.
    collection_name str
    Name of the collection the index is on.
    database str
    Name of the database the collection is in.
    fields str
    Array of Fields to configure this vectorSearch index. It is mandatory for vector searches and it must contain at least one vector type field. This field needs to be a JSON string in order to be decoded correctly.
    index_id str
    The unique identifier of the Atlas Search index.
    mappings_dynamic bool
    Indicates whether the search index uses dynamic or static mapping. For dynamic mapping, set the value to true. For static mapping, specify the fields to index using mappings_fields
    mappings_fields str
    attribute is required in search indexes when mappings_dynamic is false. This field needs to be a JSON string in order to be decoded correctly.
    name str
    The name of the search index you want to create.
    project_id str
    The ID of the organization or project you want to create the search index within.
    search_analyzer str
    Analyzer to use when searching the index. Defaults to lucene.standard
    status str
    Current status of the index.
    stored_source 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 Sequence[SearchIndexSynonymArgs]
    Synonyms mapping definition to use in this index.
    type str
    Type of index: search or vectorSearch. Default type is search.
    wait_for_index_build_completion bool
    analyzer String
    Analyzer to use when creating the index. Defaults to lucene.standard
    analyzers String
    Custom analyzers to use in this index. This is an array of JSON objects.

    analyzers = <<-EOF
    [{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    EOF
    
    clusterName String
    The name of the cluster where you want to create the search index within.
    collectionName String
    Name of the collection the index is on.
    database String
    Name of the database the collection is in.
    fields String
    Array of Fields to configure this vectorSearch index. It is mandatory for vector searches and it must contain at least one vector type field. This field needs to be a JSON string in order to be decoded correctly.
    indexId String
    The unique identifier of the Atlas Search index.
    mappingsDynamic Boolean
    Indicates whether the search index uses dynamic or static mapping. For dynamic mapping, set the value to true. For static mapping, specify the fields to index using mappings_fields
    mappingsFields String
    attribute is required in search indexes when mappings_dynamic is false. This field needs to be a JSON string in order to be decoded correctly.
    name String
    The name of the search index you want to create.
    projectId String
    The ID of the organization or project you want to create the search index within.
    searchAnalyzer String
    Analyzer to use when searching the index. Defaults to lucene.standard
    status String
    Current status of the index.
    storedSource 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 List<Property Map>
    Synonyms mapping definition to use in this index.
    type String
    Type of index: search or vectorSearch. Default type is search.
    waitForIndexBuildCompletion Boolean

    Supporting Types

    SearchIndexSynonym, SearchIndexSynonymArgs

    Analyzer string
    Analyzer to use when creating the index. Defaults to lucene.standard
    Name string
    The name of the search index you want to create.
    SourceCollection string
    (Required) Name of the source MongoDB collection for the synonyms. Documents in this collection must be in the format described in the Synonyms Source Collection Documents.
    Analyzer string
    Analyzer to use when creating the index. Defaults to lucene.standard
    Name string
    The name of the search index you want to create.
    SourceCollection string
    (Required) Name of the source MongoDB collection for the synonyms. Documents in this collection must be in the format described in the Synonyms Source Collection Documents.
    analyzer String
    Analyzer to use when creating the index. Defaults to lucene.standard
    name String
    The name of the search index you want to create.
    sourceCollection String
    (Required) Name of the source MongoDB collection for the synonyms. Documents in this collection must be in the format described in the Synonyms Source Collection Documents.
    analyzer string
    Analyzer to use when creating the index. Defaults to lucene.standard
    name string
    The name of the search index you want to create.
    sourceCollection string
    (Required) Name of the source MongoDB collection for the synonyms. Documents in this collection must be in the format described in the Synonyms Source Collection Documents.
    analyzer str
    Analyzer to use when creating the index. Defaults to lucene.standard
    name str
    The name of the search index you want to create.
    source_collection str
    (Required) Name of the source MongoDB collection for the synonyms. Documents in this collection must be in the format described in the Synonyms Source Collection Documents.
    analyzer String
    Analyzer to use when creating the index. Defaults to lucene.standard
    name String
    The name of the search index you want to create.
    sourceCollection String
    (Required) Name of the source MongoDB collection for the synonyms. Documents in this collection must be in the format described in the Synonyms Source Collection Documents.

    Package Details

    Repository
    MongoDB Atlas pulumi/pulumi-mongodbatlas
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the mongodbatlas Terraform Provider.
    mongodbatlas logo
    MongoDB Atlas v3.18.0 published on Thursday, Sep 12, 2024 by Pulumi