Update index definition reference in README.md#10542
Open
jlara310 wants to merge 1 commit into
Open
Conversation
Reconcile this page with [documentation](https://firebase.google.com/docs/reference/firestore/indexes). Update for Native mode support in Enterprise edition.
Contributor
There was a problem hiding this comment.
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 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 |
Contributor
There was a problem hiding this comment.
The schema definition for the Standard edition has a few consistency and accuracy issues:
- Indentation: The block uses 0-space indentation for top-level properties, which is inconsistent with the rest of the file (e.g., the
FieldOverridessection and the previous version of this block use 2 spaces). - Optionality: The fields
apiScope,density, andflatare optional according to the API specification and the comments, but they are missing the?suffix used for other optional fields likeorderandarrayConfig. - Grammar: In the
arrayConfigcomment, '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
- Maintain consistency in documentation formatting and technical accuracy regarding schema optionality.
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 |
Contributor
There was a problem hiding this comment.
The schema definition for the Enterprise edition has several issues:
- Indentation: The block uses 0-space indentation for top-level properties, which is inconsistent with the 2-space indentation used elsewhere in the file.
- Optionality: The fields
apiScope,multikey,density, andflatare optional but missing the?suffix. - Typo: In the
apiScopecomment, 'compatiblity' is misspelled. - Grammar: In the
arrayConfigcomment, '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
- Maintain consistency in documentation formatting and technical accuracy regarding schema optionality.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reconcile this page with documentation. Update index definition for Native mode support in Enterprise edition.