0

How do you set the .indexOn rule for a path?

I have this error message:

FIREBASE WARNING: Using an unspecified index. Consider adding ".indexOn": "userItem_ID" at /apps/d0c1d145-448a-493b-8fda-803b09935429/appData/PageNewProduct to your security rules for better performance

You can't write a key with a "/" character, so how do you specify the path of the key to be indexed?

slugster
  • 49,403
  • 14
  • 95
  • 145
  • There is currently no possibility to define indexes on lower-level children. This has been asked before, so I'll mark it as a duplicate. – Frank van Puffelen Mar 25 '15 at 22:24
  • possible duplicate of [Using .indexOn with nested keys in Firebase](http://stackoverflow.com/questions/27179094/using-indexon-with-nested-keys-in-firebase) – Frank van Puffelen Mar 25 '15 at 22:25
  • A coworker pointed out that I might be misunderstanding your problem. To clear that up, can you *edit* your question to include a snippet of your data *and* the query that you're running when this error message pops up? You might also be able to help yourself, by reading: https://www.firebase.com/docs/security/guide/indexing-data.html – Frank van Puffelen Mar 26 '15 at 00:46
  • Thanks for the comment, but at this point I've modified the code and data to use only a top-level object when needing an indexed list. – David Asher Mar 26 '15 at 23:40

0 Answers0