ios – Firestore question requires a number of indexes


I’m working the next Firestore question:

db
  .assortment("collectionId")   
  .whereFilter(Filter.orFilter([Filter.whereField("x", isEqualTo: "a"), Filter.whereField("y", isEqualTo: "a")]))
  .order(by: "dateAdded", descending: true)
  .restrict(to: 20)
  .getDocuments

The error that prints out is that the question requires a number of indexes. Once I click on the offered hyperlink to create the index I get redirected to a clean web page, so I attempted manually getting into a composite index.

  1. Assortment Id: “collectionId”
  2. Fields to Index: [“x”, Ascending], [“y”, Ascending], [“dateAdded”, Descending]
  3. Question Scope: Assortment

My problem is that I’m nonetheless receiving the identical error. Any steerage or ideas could be appreciated.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles