-
To set up NPM on your computer, download Node.js from the following link: https://nodejs.org/en/download/
-
Unzip the source code file named "Firebase Indexing.zip" here.
-
Navigate to the extracted directory of "Firebase Indexing" zip file. Press and hold the ctrl+shift buttons, then right-click the mouse button. From the context menu, select "Open PowerShell window here" to launch Windows PowerShell and execute import/export commands.
-
Execute the command "firebase login" to log in to Firebase, if you haven't already done so.
-
Execute the command "firebase init"
-
Proceed with Y and press the enter button.
-
Choose the Option > Firestore: Configure security rules and indexes files for Firestore.
Please Note: Choose the arrow down key to navigate and select options, and press the space button to confirm your selection.
-
Choose the Option > Use an existing project
-
Choose your project
-
Press Enter > ? What file should be used for Firestore Rules? firestore.rules
-
Press Enter > ? What file should be used for Firestore indexes? (firestore.indexes.json)
-
Now, the firestore.indexes.json file will be downloaded. Open this file and copy all the code from firestore_indexes.json file, then paste it into firestore.indexes.json file.
-
Now execute the command "firebase deploy --only firestore:indexes" to import indexing in firestore.