Skip to content

Update index definition reference in README.md#10542

Open
jlara310 wants to merge 1 commit into
firebase:mainfrom
jlara310:patch-3
Open

Update index definition reference in README.md#10542
jlara310 wants to merge 1 commit into
firebase:mainfrom
jlara310:patch-3

Conversation

@jlara310
Copy link
Copy Markdown

Reconcile this page with documentation. Update index definition for Native mode support in Enterprise edition.

Reconcile this page with [documentation](https://firebase.google.com/docs/reference/firestore/indexes). Update for Native mode support in Enterprise edition.
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Firestore README to distinguish between Standard and Enterprise edition index schemas, adding documentation for new fields such as apiScope, density, and vectorConfig. The review feedback identifies several consistency and accuracy issues in the documentation, specifically regarding the indentation of code blocks, missing optionality markers for several fields, and minor typographical or grammatical errors in the descriptions.

Comment thread src/firestore/README.md
Comment on lines +50 to +60
collectionGroup: string // Labeled "Collection ID" in the Firebase console
queryScope: string // One of "COLLECTION", "COLLECTION_GROUP"
apiScope: string // "ANY_API" (the default) is the only acceptable value. Optional.
density: string // "SPARSE_ALL" is the only acceptable value. Optional.
fields: array
fieldPath: string
order?: string // One of "ASCENDING", "DESCENDING"; excludes arrayConfig and vectorConfig properties
arrayConfig?: string // If this parameter used, must be "CONTAINS"; excludes order and vectorConfig properties
vectorConfig?: object // Indicates that this is a vector index; excludes order and arrayConfig properties
dimension: number // The resulting index will only include vectors of this dimension
flat: {} // Indicates the vector index is a flat index
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The schema definition for the Standard edition has a few consistency and accuracy issues:

  1. Indentation: The block uses 0-space indentation for top-level properties, which is inconsistent with the rest of the file (e.g., the FieldOverrides section and the previous version of this block use 2 spaces).
  2. Optionality: The fields apiScope, density, and flat are optional according to the API specification and the comments, but they are missing the ? suffix used for other optional fields like order and arrayConfig.
  3. Grammar: In the arrayConfig comment, 'If this parameter used' should be 'If this parameter is used'.
Suggested change
collectionGroup: string // Labeled "Collection ID" in the Firebase console
queryScope: string // One of "COLLECTION", "COLLECTION_GROUP"
apiScope: string // "ANY_API" (the default) is the only acceptable value. Optional.
density: string // "SPARSE_ALL" is the only acceptable value. Optional.
fields: array
fieldPath: string
order?: string // One of "ASCENDING", "DESCENDING"; excludes arrayConfig and vectorConfig properties
arrayConfig?: string // If this parameter used, must be "CONTAINS"; excludes order and vectorConfig properties
vectorConfig?: object // Indicates that this is a vector index; excludes order and arrayConfig properties
dimension: number // The resulting index will only include vectors of this dimension
flat: {} // Indicates the vector index is a flat index
collectionGroup: string // Labeled "Collection ID" in the Firebase console
queryScope: string // One of "COLLECTION", "COLLECTION_GROUP"
apiScope?: string // "ANY_API" (the default) is the only acceptable value. Optional.
density?: string // "SPARSE_ALL" is the only acceptable value. Optional.
fields: array
fieldPath: string
order?: string // One of "ASCENDING", "DESCENDING"; excludes arrayConfig and vectorConfig properties
arrayConfig?: string // If this parameter is used, must be "CONTAINS"; excludes order and vectorConfig properties
vectorConfig?: object // Indicates that this is a vector index; excludes order and arrayConfig properties
dimension: number // The resulting index will only include vectors of this dimension
flat?: {} // Indicates the vector index is a flat index
References
  1. Maintain consistency in documentation formatting and technical accuracy regarding schema optionality.

Comment thread src/firestore/README.md
Comment on lines +66 to +77
collectionGroup: string // Labeled "Collection ID" in the Firebase console
queryScope: string // One of "COLLECTION", "COLLECTION_GROUP"
apiScope: string // For Native mode, omit or set to "ANY_API". For MongoDB compatiblity, use "MONGODB_COMPATIBLE_API"
multikey: boolean // Indicates if this is a multikey index
density: string // One of "SPARSE_ANY" or "DENSE"
fields: array
fieldPath: string
order?: string // One of "ASCENDING", "DESCENDING"; excludes arrayConfig and vectorConfig properties
arrayConfig?: string // If this parameter used, must be "CONTAINS"; excludes order and vectorConfig properties
vectorConfig?: object // Indicates that this is a vector index; excludes order and arrayConfig properties
dimension: number // The resulting index will only include vectors of this dimension
flat: {} // Indicates the vector index is a flat index
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The schema definition for the Enterprise edition has several issues:

  1. Indentation: The block uses 0-space indentation for top-level properties, which is inconsistent with the 2-space indentation used elsewhere in the file.
  2. Optionality: The fields apiScope, multikey, density, and flat are optional but missing the ? suffix.
  3. Typo: In the apiScope comment, 'compatiblity' is misspelled.
  4. Grammar: In the arrayConfig comment, 'If this parameter used' should be 'If this parameter is used'.
Suggested change
collectionGroup: string // Labeled "Collection ID" in the Firebase console
queryScope: string // One of "COLLECTION", "COLLECTION_GROUP"
apiScope: string // For Native mode, omit or set to "ANY_API". For MongoDB compatiblity, use "MONGODB_COMPATIBLE_API"
multikey: boolean // Indicates if this is a multikey index
density: string // One of "SPARSE_ANY" or "DENSE"
fields: array
fieldPath: string
order?: string // One of "ASCENDING", "DESCENDING"; excludes arrayConfig and vectorConfig properties
arrayConfig?: string // If this parameter used, must be "CONTAINS"; excludes order and vectorConfig properties
vectorConfig?: object // Indicates that this is a vector index; excludes order and arrayConfig properties
dimension: number // The resulting index will only include vectors of this dimension
flat: {} // Indicates the vector index is a flat index
collectionGroup: string // Labeled "Collection ID" in the Firebase console
queryScope: string // One of "COLLECTION", "COLLECTION_GROUP"
apiScope?: string // For Native mode, omit or set to "ANY_API". For MongoDB compatibility, use "MONGODB_COMPATIBLE_API"
multikey?: boolean // Indicates if this is a multikey index
density?: string // One of "SPARSE_ANY" or "DENSE"
fields: array
fieldPath: string
order?: string // One of "ASCENDING", "DESCENDING"; excludes arrayConfig and vectorConfig properties
arrayConfig?: string // If this parameter is used, must be "CONTAINS"; excludes order and vectorConfig properties
vectorConfig?: object // Indicates that this is a vector index; excludes order and arrayConfig properties
dimension: number // The resulting index will only include vectors of this dimension
flat?: {} // Indicates the vector index is a flat index
References
  1. Maintain consistency in documentation formatting and technical accuracy regarding schema optionality.

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