How to create and use Indexes in iOS Swift?

Hi Team,

Document model is
des:“new plu added”,
In my database nearly one million documents available. When I am getting these documents using QueryBuilder it will take time to return documents. To over come this I want to use Indexes concept. Some times I need to create index using “desc” and some times “operationType” key. In the below link I found the creating Index code but couldn’t found how to use created Index? Please help me out.

Thanks in advance

Using them is automatic, there is no explicit API call needed to use them. If you want to find out if they are being used, then call explain on your query and see if it contains the index name in the output.