Atlas Search Admin API Creating Autocomplete index but no Field is shown on the Atlas UI and not able to access the Visual Editor

  • We are creating Mongo Search Indexes via our Golang code using the Admin API
  1. The first index is called PRODUCT_SEARCH_INDEX on the collection named ag_products, it has the following JSON file
  "analyzer": "lucene.english",
  "searchAnalyzer": "lucene.english",
  "mappings": {
    "dynamic": false,
    "fields": {
      "name": {
        "analyzer": "lucene.english",
        "type": "string"
      }
    }
  }
}
  1. The second index is called Autocomplete_Search_Index on the collection named keywords and has the following JSON file
{
  "analyzer": "lucene.english",
  "searchAnalyzer": "lucene.english",
  "mappings": {
    "dynamic": false,
    "fields": {
      "label": {
        "analyzer": "lucene.simple",
        "tokenization": "nGram",
        "type": "autocomplete"
      }
    }
  }
}

  • When accessing the Atlas Search GUI online, we are unable to use the visual editor for the 2nd Index called Autocomplete_Search_Index, It is returning an error called

Your index is incompatible with the Visual Editor. Instead, cancel and use the JSON editor to view and refine your existing index.

Hi there! Thanks for sharing in the MongoDB community. You should be able to see the cause of an “Incompatible with the Visual Index Builder” error by hovering over the “Save” button. In this case, it’s because the Visual Index Builder does not support configuring the analyzer field for autocomplete field mappings. It’s built this way because using an analyzer other than the default lucene.standard for autocomplete field mappings is an advanced and complex use case that more novice users get confused by.

Would you be able to share more about why you want to use the Visual Index Builder after creating the index via the Admin API?

1 Like