Skip to content

Conversation

@ninjaAB-5
Copy link
Contributor

@ninjaAB-5 ninjaAB-5 commented Oct 29, 2025

Description

Vector index of standard edition database are not properly handled when it comes to __name__ normalization, which can cause issues like #9385. This PR is to address that issue.

Scenarios Tested

A reproduce of #9385 -

  1. Fill in firestore.indexes.json with
{
  "indexes": [
    {
      "collectionGroup": "myVectorCollection",
      "queryScope": "COLLECTION",
      "fields": [
        {
          "fieldPath": "embedding",
          "vectorConfig": {
            "dimension": 768,
            "flat": {}
          }
        }
      ],
      "density": "SPARSE_ALL"
    }
  ],
  "fieldOverrides": []
}
  1. Run firebase deploy --only firestore:indexes and successfully deploy the index
  2. Pull the latest index definition via firebase firestore:indexes --database=index-fix > firestore.indexes.json and confirm the normalization is properly handled.
{
  "indexes": [
    {
      "collectionGroup": "myVectorCollection",
      "queryScope": "COLLECTION",
      "fields": [
        {
          "fieldPath": "__name__",
          "order": "ASCENDING"
        },
        {
          "fieldPath": "embedding",
          "vectorConfig": {
            "dimension": 768,
            "flat": {}
          }
        }
      ],
      "density": "SPARSE_ALL"
    }
  ],
  "fieldOverrides": []
}
  1. Deploy again with firebase deploy --only firestore:indexes and no error shows up.

See the test added to src/firestore/indexes.spec.ts for other scenarios tested.

@ninjaAB-5 ninjaAB-5 marked this pull request as ready for review October 29, 2025 21:17
@ninjaAB-5 ninjaAB-5 requested a review from joehan October 29, 2025 21:17
@joehan joehan merged commit d0897a2 into master Oct 30, 2025
50 checks passed
@joehan joehan deleted the rxg/index-deploy branch October 30, 2025 22:10
@github-project-automation github-project-automation bot moved this from Approved [PR] to Done in [Cloud] Extensions + Functions Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants