Skip to content

Commit 7cad3ca

Browse files
committed
feat(firestore/pipelines): expose search stage and pipeline expressions
1 parent 284a50b commit 7cad3ca

35 files changed

Lines changed: 1481 additions & 594 deletions

.github/scripts/compare-types/configs/firestore-pipelines.ts

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -21,36 +21,7 @@ import type { PackageConfig } from '../src/types';
2121

2222
const config: PackageConfig = {
2323
nameMapping: {},
24-
missingInRN: [
25-
{
26-
name: 'documentMatches',
27-
reason:
28-
'Newer firebase-js-sdk document expression helper not yet exposed by RN Firebase pipelines.',
29-
},
30-
{
31-
name: 'geoDistance',
32-
reason:
33-
'Newer firebase-js-sdk geospatial expression helper not yet exposed by RN Firebase pipelines.',
34-
},
35-
{
36-
name: 'score',
37-
reason:
38-
'Newer firebase-js-sdk search score expression helper not yet exposed by RN Firebase pipelines.',
39-
},
40-
{
41-
name: 'DefineStageOptions',
42-
reason: 'Newer firebase-js-sdk stage options type not yet exposed by RN Firebase pipelines.',
43-
},
44-
{
45-
name: 'parent',
46-
reason: 'Newer firebase-js-sdk parent stage helper not yet exposed by RN Firebase pipelines.',
47-
},
48-
{
49-
name: 'SearchStageOptions',
50-
reason:
51-
'Newer firebase-js-sdk search stage options type not yet exposed by RN Firebase pipelines.',
52-
},
53-
],
24+
missingInRN: [],
5425
extraInRN: [
5526
{
5627
name: 'Type',

.github/workflows/scripts/README-firestore.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ firebase firestore:indexes --project react-native-firebase-testing --database pi
4848

4949
There is no `firebase firestore:rules` pull command; edit the `.rules` files in-repo and deploy.
5050

51+
52+
## Index deploy verify cycle
53+
54+
Canonical workflow (CLI ≥ 15.17.0 for search indexes): sync → edit JSON → `./deploy-firestore.sh` (runs `verify-firestore-indexes.sh`) → sync again → confirm cloud pull matches intent. Full policy and tooling surfaces: [okf-bundle Firebase testing project doc](../../../okf-bundle/testing/firebase-testing-project.md#index-change-workflow-sync--edit--deploy--verify).
55+
5156
## Deploy to cloud
5257

5358
```bash

.github/workflows/scripts/deploy-firestore.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,7 @@ echo ""
2222
# Use full firestore target (not firestore:rules / firestore:indexes) — sub-targets can
2323
# silently no-op with multi-database config.
2424
"${FIREBASE_CMD[@]}" deploy --only firestore --config firebase.deploy.json
25+
26+
echo ""
27+
echo "Running post-deploy index verification..."
28+
"$SCRIPT_DIR/verify-firestore-indexes.sh"

.github/workflows/scripts/firestore.pipelines-e2e.indexes.json

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,28 @@
1111
"flat": {}
1212
}
1313
}
14-
]
14+
],
15+
"density": "DENSE"
16+
},
17+
{
18+
"collectionGroup": "search-text",
19+
"queryScope": "COLLECTION",
20+
"fields": [
21+
{
22+
"fieldPath": "menu",
23+
"searchConfig": {
24+
"textSpec": {
25+
"indexSpecs": [
26+
{
27+
"indexType": "TOKENIZED",
28+
"matchType": "MATCH_GLOBALLY"
29+
}
30+
]
31+
}
32+
}
33+
}
34+
],
35+
"density": "SPARSE_ANY"
1536
}
1637
],
1738
"fieldOverrides": []

.github/workflows/scripts/functions/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
"devDependencies": {
2121
"firebase-functions-test": "^3.4.1",
22-
"firebase-tools": "^15.16.0",
22+
"firebase-tools": "^15.22.4",
2323
"typescript": "^6.0.3"
2424
},
2525
"private": true,

0 commit comments

Comments
 (0)