- We are creating Mongo Search Indexes via our Golang code using the Admin API
- 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"
}
}
}
}
- 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.
- Another thing to note is that the GUI is not showing the mapping of the field in the Autocomplete_Search_Index