Using Atlas Search with search multiple field and multiple criteria

Hi Team,

I have a requirement to implement an API for displaying list data on the front end. Users should be able to search using multiple criteria. Previously, we had a similar requirement and used a standard MongoDB query. For the new feature, we are considering using the Atlas Search feature to enhance data search capabilities.

I have specific requirements for each field: (example)

–Number and Name: These are strings and need to support case-insensitive, text containment searches. The filter text should exist in the specified field. We do not need fuzzy search or prediction capabilities.
–Type: This is a string with enum values, requiring equality checks within an array.
–TotalValue: This is a number and needs to support comparison operators such as <, >, <=, >=, and = (equal and range).
–Date: This is a date and needs to support equality and range comparisons (=, <, >).

I tested Atlas Search with dynamic type, and it supports all scenarios except text containment. I attempted to update the Atlas Search configuration to use autocomplete, but it did not work as expected. Could you suggest an index configuration? Can it be mixed?

–For fields that need to support containment searches, should we use autocomplete?
–For other fields, what configuration should be applied?
I am still unclear on how to effectively use it.

Hi @Thanawat_Sujitanan , can you provide the index definition that you are using? You may find the Search Playground a helpful way to test and share your configurations.

Also, can you elaborate on what you mean by “containment” searches, and what types of strings you expect to search on, and what the matching documents should be?