1. Packages
  2. MongoDB Atlas
  3. API Docs
  4. SearchIndex
MongoDB Atlas v3.14.3 published on Monday, Apr 1, 2024 by Pulumi

mongodbatlas.SearchIndex

Explore with Pulumi AI

mongodbatlas logo
MongoDB Atlas v3.14.3 published on Monday, Apr 1, 2024 by Pulumi

    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", {
        analyzer: "lucene.standard",
        clusterName: "<CLUSTER_NAME>",
        collectionName: "collection_test",
        database: "database_test",
        mappingsDynamic: true,
        projectId: "<PROJECT_ID>",
        searchAnalyzer: "lucene.standard",
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    test_basic_search_index = mongodbatlas.SearchIndex("test-basic-search-index",
        analyzer="lucene.standard",
        cluster_name="<CLUSTER_NAME>",
        collection_name="collection_test",
        database="database_test",
        mappings_dynamic=True,
        project_id="<PROJECT_ID>",
        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{
    			Analyzer:        pulumi.String("lucene.standard"),
    			ClusterName:     pulumi.String("<CLUSTER_NAME>"),
    			CollectionName:  pulumi.String("collection_test"),
    			Database:        pulumi.String("database_test"),
    			MappingsDynamic: pulumi.Bool(true),
    			ProjectId:       pulumi.String("<PROJECT_ID>"),
    			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()
        {
            Analyzer = "lucene.standard",
            ClusterName = "<CLUSTER_NAME>",
            CollectionName = "collection_test",
            Database = "database_test",
            MappingsDynamic = true,
            ProjectId = "<PROJECT_ID>",
            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()        
                .analyzer("lucene.standard")
                .clusterName("<CLUSTER_NAME>")
                .collectionName("collection_test")
                .database("database_test")
                .mappingsDynamic(true)
                .projectId("<PROJECT_ID>")
                .searchAnalyzer("lucene.standard")
                .build());
    
        }
    }
    
    resources:
      test-basic-search-index:
        type: mongodbatlas:SearchIndex
        properties:
          analyzer: lucene.standard
          clusterName: <CLUSTER_NAME>
          collectionName: collection_test
          database: database_test
          mappingsDynamic: true
          projectId: <PROJECT_ID>
          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"
          }
    }
    `,
        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: [{
            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"
          }
    }
    """,
        search_analyzer="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=[mongodbatlas.SearchIndexSynonymArgs(
            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"
          }
    }
    `),
    			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""
          }
    }
    ",
            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"
          }
    }
                """)
                .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"
                  }
            }        
          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,
                    mappings_dynamic: Optional[bool] = None,
                    fields: Optional[str] = None,
                    analyzers: Optional[str] = None,
                    mappings_fields: Optional[str] = None,
                    search_analyzer: Optional[str] = None,
                    analyzer: Optional[str] = None,
                    name: 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.

    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",
        MappingsDynamic = false,
        Fields = "string",
        Analyzers = "string",
        MappingsFields = "string",
        SearchAnalyzer = "string",
        Analyzer = "string",
        Name = "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"),
    	MappingsDynamic: pulumi.Bool(false),
    	Fields:          pulumi.String("string"),
    	Analyzers:       pulumi.String("string"),
    	MappingsFields:  pulumi.String("string"),
    	SearchAnalyzer:  pulumi.String("string"),
    	Analyzer:        pulumi.String("string"),
    	Name:            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")
        .mappingsDynamic(false)
        .fields("string")
        .analyzers("string")
        .mappingsFields("string")
        .searchAnalyzer("string")
        .analyzer("string")
        .name("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",
        mappings_dynamic=False,
        fields="string",
        analyzers="string",
        mappings_fields="string",
        search_analyzer="string",
        analyzer="string",
        name="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",
        mappingsDynamic: false,
        fields: "string",
        analyzers: "string",
        mappingsFields: "string",
        searchAnalyzer: "string",
        analyzer: "string",
        name: "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
        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.

    import * as pulumi from "@pulumi/pulumi";
    

    const analyzers = [{ &quot;name&quot;: &quot;index_analyzer_test_name&quot;, &quot;charFilters&quot;: [{ &quot;type&quot;: &quot;mapping&quot;, &quot;mappings&quot;: {&quot;\\\\&quot; : &quot;/&quot;} }], &quot;tokenizer&quot;: { &quot;type&quot;: &quot;nGram&quot;, &quot;minGram&quot;: 2, &quot;maxGram&quot;: 5 }, &quot;tokenFilters&quot;: [{ &quot;type&quot;: &quot;length&quot;, &quot;min&quot;: 20, &quot;max&quot;: 33 }] }] ;

    import pulumi
    
    analyzers = """[{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    """
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
        var analyzers = @"[{
    ""name"": ""index_analyzer_test_name"",
    ""charFilters"": [{
    ""type"": ""mapping"",
    ""mappings"": {""\\"" : ""/""}
    }],
    ""tokenizer"": {
    ""type"": ""nGram"",
    ""minGram"": 2,
    ""maxGram"": 5
    },
    ""tokenFilters"": [{
    ""type"": ""length"",
    ""min"": 20,
    ""max"": 33
    }]
    }]
    ";
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_ := `[{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    `
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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 analyzers = """
    [{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
            """;
    
        }
    }
    
    variables:
      analyzers: |
        [{
        "name": "index_analyzer_test_name",
        "charFilters": [{
        "type": "mapping",
        "mappings": {"\\" : "/"}
        }],
        "tokenizer": {
        "type": "nGram",
        "minGram": 2,
        "maxGram": 5
        },
        "tokenFilters": [{
        "type": "length",
        "min": 20,
        "max": 33
        }]
        }]
    
    title="Optional"> <span id="fields_csharp">

    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
    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.

    import * as pulumi from "@pulumi/pulumi";
    

    const analyzers = [{ &quot;name&quot;: &quot;index_analyzer_test_name&quot;, &quot;charFilters&quot;: [{ &quot;type&quot;: &quot;mapping&quot;, &quot;mappings&quot;: {&quot;\\\\&quot; : &quot;/&quot;} }], &quot;tokenizer&quot;: { &quot;type&quot;: &quot;nGram&quot;, &quot;minGram&quot;: 2, &quot;maxGram&quot;: 5 }, &quot;tokenFilters&quot;: [{ &quot;type&quot;: &quot;length&quot;, &quot;min&quot;: 20, &quot;max&quot;: 33 }] }] ;

    import pulumi
    
    analyzers = """[{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    """
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
        var analyzers = @"[{
    ""name"": ""index_analyzer_test_name"",
    ""charFilters"": [{
    ""type"": ""mapping"",
    ""mappings"": {""\\"" : ""/""}
    }],
    ""tokenizer"": {
    ""type"": ""nGram"",
    ""minGram"": 2,
    ""maxGram"": 5
    },
    ""tokenFilters"": [{
    ""type"": ""length"",
    ""min"": 20,
    ""max"": 33
    }]
    }]
    ";
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_ := `[{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    `
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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 analyzers = """
    [{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
            """;
    
        }
    }
    
    variables:
      analyzers: |
        [{
        "name": "index_analyzer_test_name",
        "charFilters": [{
        "type": "mapping",
        "mappings": {"\\" : "/"}
        }],
        "tokenizer": {
        "type": "nGram",
        "minGram": 2,
        "maxGram": 5
        },
        "tokenFilters": [{
        "type": "length",
        "min": 20,
        "max": 33
        }]
        }]
    
    title="Optional"> <span id="fields_go">

    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
    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.

    import * as pulumi from "@pulumi/pulumi";
    

    const analyzers = [{ &quot;name&quot;: &quot;index_analyzer_test_name&quot;, &quot;charFilters&quot;: [{ &quot;type&quot;: &quot;mapping&quot;, &quot;mappings&quot;: {&quot;\\\\&quot; : &quot;/&quot;} }], &quot;tokenizer&quot;: { &quot;type&quot;: &quot;nGram&quot;, &quot;minGram&quot;: 2, &quot;maxGram&quot;: 5 }, &quot;tokenFilters&quot;: [{ &quot;type&quot;: &quot;length&quot;, &quot;min&quot;: 20, &quot;max&quot;: 33 }] }] ;

    import pulumi
    
    analyzers = """[{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    """
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
        var analyzers = @"[{
    ""name"": ""index_analyzer_test_name"",
    ""charFilters"": [{
    ""type"": ""mapping"",
    ""mappings"": {""\\"" : ""/""}
    }],
    ""tokenizer"": {
    ""type"": ""nGram"",
    ""minGram"": 2,
    ""maxGram"": 5
    },
    ""tokenFilters"": [{
    ""type"": ""length"",
    ""min"": 20,
    ""max"": 33
    }]
    }]
    ";
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_ := `[{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    `
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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 analyzers = """
    [{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
            """;
    
        }
    }
    
    variables:
      analyzers: |
        [{
        "name": "index_analyzer_test_name",
        "charFilters": [{
        "type": "mapping",
        "mappings": {"\\" : "/"}
        }],
        "tokenizer": {
        "type": "nGram",
        "minGram": 2,
        "maxGram": 5
        },
        "tokenFilters": [{
        "type": "length",
        "min": 20,
        "max": 33
        }]
        }]
    
    title="Optional"> <span id="fields_java">

    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
    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.

    import * as pulumi from "@pulumi/pulumi";
    

    const analyzers = [{ &quot;name&quot;: &quot;index_analyzer_test_name&quot;, &quot;charFilters&quot;: [{ &quot;type&quot;: &quot;mapping&quot;, &quot;mappings&quot;: {&quot;\\\\&quot; : &quot;/&quot;} }], &quot;tokenizer&quot;: { &quot;type&quot;: &quot;nGram&quot;, &quot;minGram&quot;: 2, &quot;maxGram&quot;: 5 }, &quot;tokenFilters&quot;: [{ &quot;type&quot;: &quot;length&quot;, &quot;min&quot;: 20, &quot;max&quot;: 33 }] }] ;

    import pulumi
    
    analyzers = """[{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    """
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
        var analyzers = @"[{
    ""name"": ""index_analyzer_test_name"",
    ""charFilters"": [{
    ""type"": ""mapping"",
    ""mappings"": {""\\"" : ""/""}
    }],
    ""tokenizer"": {
    ""type"": ""nGram"",
    ""minGram"": 2,
    ""maxGram"": 5
    },
    ""tokenFilters"": [{
    ""type"": ""length"",
    ""min"": 20,
    ""max"": 33
    }]
    }]
    ";
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_ := `[{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    `
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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 analyzers = """
    [{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
            """;
    
        }
    }
    
    variables:
      analyzers: |
        [{
        "name": "index_analyzer_test_name",
        "charFilters": [{
        "type": "mapping",
        "mappings": {"\\" : "/"}
        }],
        "tokenizer": {
        "type": "nGram",
        "minGram": 2,
        "maxGram": 5
        },
        "tokenFilters": [{
        "type": "length",
        "min": 20,
        "max": 33
        }]
        }]
    
    title="Optional"> <span id="fields_nodejs">

    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
    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.

    import * as pulumi from "@pulumi/pulumi";
    

    const analyzers = [{ &quot;name&quot;: &quot;index_analyzer_test_name&quot;, &quot;charFilters&quot;: [{ &quot;type&quot;: &quot;mapping&quot;, &quot;mappings&quot;: {&quot;\\\\&quot; : &quot;/&quot;} }], &quot;tokenizer&quot;: { &quot;type&quot;: &quot;nGram&quot;, &quot;minGram&quot;: 2, &quot;maxGram&quot;: 5 }, &quot;tokenFilters&quot;: [{ &quot;type&quot;: &quot;length&quot;, &quot;min&quot;: 20, &quot;max&quot;: 33 }] }] ;

    import pulumi
    
    analyzers = """[{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    """
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
        var analyzers = @"[{
    ""name"": ""index_analyzer_test_name"",
    ""charFilters"": [{
    ""type"": ""mapping"",
    ""mappings"": {""\\"" : ""/""}
    }],
    ""tokenizer"": {
    ""type"": ""nGram"",
    ""minGram"": 2,
    ""maxGram"": 5
    },
    ""tokenFilters"": [{
    ""type"": ""length"",
    ""min"": 20,
    ""max"": 33
    }]
    }]
    ";
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_ := `[{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    `
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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 analyzers = """
    [{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
            """;
    
        }
    }
    
    variables:
      analyzers: |
        [{
        "name": "index_analyzer_test_name",
        "charFilters": [{
        "type": "mapping",
        "mappings": {"\\" : "/"}
        }],
        "tokenizer": {
        "type": "nGram",
        "minGram": 2,
        "maxGram": 5
        },
        "tokenFilters": [{
        "type": "length",
        "min": 20,
        "max": 33
        }]
        }]
    
    title="Optional"> <span id="fields_python">

    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
    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.

    import * as pulumi from "@pulumi/pulumi";
    

    const analyzers = [{ &quot;name&quot;: &quot;index_analyzer_test_name&quot;, &quot;charFilters&quot;: [{ &quot;type&quot;: &quot;mapping&quot;, &quot;mappings&quot;: {&quot;\\\\&quot; : &quot;/&quot;} }], &quot;tokenizer&quot;: { &quot;type&quot;: &quot;nGram&quot;, &quot;minGram&quot;: 2, &quot;maxGram&quot;: 5 }, &quot;tokenFilters&quot;: [{ &quot;type&quot;: &quot;length&quot;, &quot;min&quot;: 20, &quot;max&quot;: 33 }] }] ;

    import pulumi
    
    analyzers = """[{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    """
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
        var analyzers = @"[{
    ""name"": ""index_analyzer_test_name"",
    ""charFilters"": [{
    ""type"": ""mapping"",
    ""mappings"": {""\\"" : ""/""}
    }],
    ""tokenizer"": {
    ""type"": ""nGram"",
    ""minGram"": 2,
    ""maxGram"": 5
    },
    ""tokenFilters"": [{
    ""type"": ""length"",
    ""min"": 20,
    ""max"": 33
    }]
    }]
    ";
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_ := `[{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    `
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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 analyzers = """
    [{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
            """;
    
        }
    }
    
    variables:
      analyzers: |
        [{
        "name": "index_analyzer_test_name",
        "charFilters": [{
        "type": "mapping",
        "mappings": {"\\" : "/"}
        }],
        "tokenizer": {
        "type": "nGram",
        "minGram": 2,
        "maxGram": 5
        },
        "tokenFilters": [{
        "type": "length",
        "min": 20,
        "max": 33
        }]
        }]
    
    title="Optional"> <span id="fields_yaml">

    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
    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
    Status string
    Current status of the index.
    Id string
    The provider-assigned unique ID for this managed resource.
    IndexId string
    Status string
    Current status of the index.
    id String
    The provider-assigned unique ID for this managed resource.
    indexId String
    status String
    Current status of the index.
    id string
    The provider-assigned unique ID for this managed resource.
    indexId string
    status string
    Current status of the index.
    id str
    The provider-assigned unique ID for this managed resource.
    index_id str
    status str
    Current status of the index.
    id String
    The provider-assigned unique ID for this managed resource.
    indexId String
    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,
            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.

    import * as pulumi from "@pulumi/pulumi";
    

    const analyzers = [{ &quot;name&quot;: &quot;index_analyzer_test_name&quot;, &quot;charFilters&quot;: [{ &quot;type&quot;: &quot;mapping&quot;, &quot;mappings&quot;: {&quot;\\\\&quot; : &quot;/&quot;} }], &quot;tokenizer&quot;: { &quot;type&quot;: &quot;nGram&quot;, &quot;minGram&quot;: 2, &quot;maxGram&quot;: 5 }, &quot;tokenFilters&quot;: [{ &quot;type&quot;: &quot;length&quot;, &quot;min&quot;: 20, &quot;max&quot;: 33 }] }] ;

    import pulumi
    
    analyzers = """[{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    """
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
        var analyzers = @"[{
    ""name"": ""index_analyzer_test_name"",
    ""charFilters"": [{
    ""type"": ""mapping"",
    ""mappings"": {""\\"" : ""/""}
    }],
    ""tokenizer"": {
    ""type"": ""nGram"",
    ""minGram"": 2,
    ""maxGram"": 5
    },
    ""tokenFilters"": [{
    ""type"": ""length"",
    ""min"": 20,
    ""max"": 33
    }]
    }]
    ";
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_ := `[{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    `
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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 analyzers = """
    [{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
            """;
    
        }
    }
    
    variables:
      analyzers: |
        [{
        "name": "index_analyzer_test_name",
        "charFilters": [{
        "type": "mapping",
        "mappings": {"\\" : "/"}
        }],
        "tokenizer": {
        "type": "nGram",
        "minGram": 2,
        "maxGram": 5
        },
        "tokenFilters": [{
        "type": "length",
        "min": 20,
        "max": 33
        }]
        }]
    
    title="Optional"> <span id="state_clustername_csharp">

    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
    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.
    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.

    import * as pulumi from "@pulumi/pulumi";
    

    const analyzers = [{ &quot;name&quot;: &quot;index_analyzer_test_name&quot;, &quot;charFilters&quot;: [{ &quot;type&quot;: &quot;mapping&quot;, &quot;mappings&quot;: {&quot;\\\\&quot; : &quot;/&quot;} }], &quot;tokenizer&quot;: { &quot;type&quot;: &quot;nGram&quot;, &quot;minGram&quot;: 2, &quot;maxGram&quot;: 5 }, &quot;tokenFilters&quot;: [{ &quot;type&quot;: &quot;length&quot;, &quot;min&quot;: 20, &quot;max&quot;: 33 }] }] ;

    import pulumi
    
    analyzers = """[{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    """
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
        var analyzers = @"[{
    ""name"": ""index_analyzer_test_name"",
    ""charFilters"": [{
    ""type"": ""mapping"",
    ""mappings"": {""\\"" : ""/""}
    }],
    ""tokenizer"": {
    ""type"": ""nGram"",
    ""minGram"": 2,
    ""maxGram"": 5
    },
    ""tokenFilters"": [{
    ""type"": ""length"",
    ""min"": 20,
    ""max"": 33
    }]
    }]
    ";
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_ := `[{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    `
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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 analyzers = """
    [{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
            """;
    
        }
    }
    
    variables:
      analyzers: |
        [{
        "name": "index_analyzer_test_name",
        "charFilters": [{
        "type": "mapping",
        "mappings": {"\\" : "/"}
        }],
        "tokenizer": {
        "type": "nGram",
        "minGram": 2,
        "maxGram": 5
        },
        "tokenFilters": [{
        "type": "length",
        "min": 20,
        "max": 33
        }]
        }]
    
    title="Optional"> <span id="state_clustername_go">

    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
    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.
    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.

    import * as pulumi from "@pulumi/pulumi";
    

    const analyzers = [{ &quot;name&quot;: &quot;index_analyzer_test_name&quot;, &quot;charFilters&quot;: [{ &quot;type&quot;: &quot;mapping&quot;, &quot;mappings&quot;: {&quot;\\\\&quot; : &quot;/&quot;} }], &quot;tokenizer&quot;: { &quot;type&quot;: &quot;nGram&quot;, &quot;minGram&quot;: 2, &quot;maxGram&quot;: 5 }, &quot;tokenFilters&quot;: [{ &quot;type&quot;: &quot;length&quot;, &quot;min&quot;: 20, &quot;max&quot;: 33 }] }] ;

    import pulumi
    
    analyzers = """[{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    """
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
        var analyzers = @"[{
    ""name"": ""index_analyzer_test_name"",
    ""charFilters"": [{
    ""type"": ""mapping"",
    ""mappings"": {""\\"" : ""/""}
    }],
    ""tokenizer"": {
    ""type"": ""nGram"",
    ""minGram"": 2,
    ""maxGram"": 5
    },
    ""tokenFilters"": [{
    ""type"": ""length"",
    ""min"": 20,
    ""max"": 33
    }]
    }]
    ";
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_ := `[{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    `
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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 analyzers = """
    [{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
            """;
    
        }
    }
    
    variables:
      analyzers: |
        [{
        "name": "index_analyzer_test_name",
        "charFilters": [{
        "type": "mapping",
        "mappings": {"\\" : "/"}
        }],
        "tokenizer": {
        "type": "nGram",
        "minGram": 2,
        "maxGram": 5
        },
        "tokenFilters": [{
        "type": "length",
        "min": 20,
        "max": 33
        }]
        }]
    
    title="Optional"> <span id="state_clustername_java">

    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
    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.
    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.

    import * as pulumi from "@pulumi/pulumi";
    

    const analyzers = [{ &quot;name&quot;: &quot;index_analyzer_test_name&quot;, &quot;charFilters&quot;: [{ &quot;type&quot;: &quot;mapping&quot;, &quot;mappings&quot;: {&quot;\\\\&quot; : &quot;/&quot;} }], &quot;tokenizer&quot;: { &quot;type&quot;: &quot;nGram&quot;, &quot;minGram&quot;: 2, &quot;maxGram&quot;: 5 }, &quot;tokenFilters&quot;: [{ &quot;type&quot;: &quot;length&quot;, &quot;min&quot;: 20, &quot;max&quot;: 33 }] }] ;

    import pulumi
    
    analyzers = """[{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    """
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
        var analyzers = @"[{
    ""name"": ""index_analyzer_test_name"",
    ""charFilters"": [{
    ""type"": ""mapping"",
    ""mappings"": {""\\"" : ""/""}
    }],
    ""tokenizer"": {
    ""type"": ""nGram"",
    ""minGram"": 2,
    ""maxGram"": 5
    },
    ""tokenFilters"": [{
    ""type"": ""length"",
    ""min"": 20,
    ""max"": 33
    }]
    }]
    ";
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_ := `[{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    `
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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 analyzers = """
    [{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
            """;
    
        }
    }
    
    variables:
      analyzers: |
        [{
        "name": "index_analyzer_test_name",
        "charFilters": [{
        "type": "mapping",
        "mappings": {"\\" : "/"}
        }],
        "tokenizer": {
        "type": "nGram",
        "minGram": 2,
        "maxGram": 5
        },
        "tokenFilters": [{
        "type": "length",
        "min": 20,
        "max": 33
        }]
        }]
    
    title="Optional"> <span id="state_clustername_nodejs">

    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
    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.
    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.

    import * as pulumi from "@pulumi/pulumi";
    

    const analyzers = [{ &quot;name&quot;: &quot;index_analyzer_test_name&quot;, &quot;charFilters&quot;: [{ &quot;type&quot;: &quot;mapping&quot;, &quot;mappings&quot;: {&quot;\\\\&quot; : &quot;/&quot;} }], &quot;tokenizer&quot;: { &quot;type&quot;: &quot;nGram&quot;, &quot;minGram&quot;: 2, &quot;maxGram&quot;: 5 }, &quot;tokenFilters&quot;: [{ &quot;type&quot;: &quot;length&quot;, &quot;min&quot;: 20, &quot;max&quot;: 33 }] }] ;

    import pulumi
    
    analyzers = """[{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    """
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
        var analyzers = @"[{
    ""name"": ""index_analyzer_test_name"",
    ""charFilters"": [{
    ""type"": ""mapping"",
    ""mappings"": {""\\"" : ""/""}
    }],
    ""tokenizer"": {
    ""type"": ""nGram"",
    ""minGram"": 2,
    ""maxGram"": 5
    },
    ""tokenFilters"": [{
    ""type"": ""length"",
    ""min"": 20,
    ""max"": 33
    }]
    }]
    ";
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_ := `[{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    `
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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 analyzers = """
    [{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
            """;
    
        }
    }
    
    variables:
      analyzers: |
        [{
        "name": "index_analyzer_test_name",
        "charFilters": [{
        "type": "mapping",
        "mappings": {"\\" : "/"}
        }],
        "tokenizer": {
        "type": "nGram",
        "minGram": 2,
        "maxGram": 5
        },
        "tokenFilters": [{
        "type": "length",
        "min": 20,
        "max": 33
        }]
        }]
    
    title="Optional"> <span id="state_cluster_name_python">

    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
    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.
    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.

    import * as pulumi from "@pulumi/pulumi";
    

    const analyzers = [{ &quot;name&quot;: &quot;index_analyzer_test_name&quot;, &quot;charFilters&quot;: [{ &quot;type&quot;: &quot;mapping&quot;, &quot;mappings&quot;: {&quot;\\\\&quot; : &quot;/&quot;} }], &quot;tokenizer&quot;: { &quot;type&quot;: &quot;nGram&quot;, &quot;minGram&quot;: 2, &quot;maxGram&quot;: 5 }, &quot;tokenFilters&quot;: [{ &quot;type&quot;: &quot;length&quot;, &quot;min&quot;: 20, &quot;max&quot;: 33 }] }] ;

    import pulumi
    
    analyzers = """[{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    """
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
        var analyzers = @"[{
    ""name"": ""index_analyzer_test_name"",
    ""charFilters"": [{
    ""type"": ""mapping"",
    ""mappings"": {""\\"" : ""/""}
    }],
    ""tokenizer"": {
    ""type"": ""nGram"",
    ""minGram"": 2,
    ""maxGram"": 5
    },
    ""tokenFilters"": [{
    ""type"": ""length"",
    ""min"": 20,
    ""max"": 33
    }]
    }]
    ";
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_ := `[{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
    `
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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 analyzers = """
    [{
    "name": "index_analyzer_test_name",
    "charFilters": [{
    "type": "mapping",
    "mappings": {"\\" : "/"}
    }],
    "tokenizer": {
    "type": "nGram",
    "minGram": 2,
    "maxGram": 5
    },
    "tokenFilters": [{
    "type": "length",
    "min": 20,
    "max": 33
    }]
    }]
            """;
    
        }
    }
    
    variables:
      analyzers: |
        [{
        "name": "index_analyzer_test_name",
        "charFilters": [{
        "type": "mapping",
        "mappings": {"\\" : "/"}
        }],
        "tokenizer": {
        "type": "nGram",
        "minGram": 2,
        "maxGram": 5
        },
        "tokenFilters": [{
        "type": "length",
        "min": 20,
        "max": 33
        }]
        }]
    
    title="Optional"> <span id="state_clustername_yaml">

    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
    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.
    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.14.3 published on Monday, Apr 1, 2024 by Pulumi