Skip to content

Commit

Permalink
Move MIEQ tests to composite index file (#7999)
Browse files Browse the repository at this point in the history
  • Loading branch information
milaGGL committed Mar 29, 2024
1 parent 42fcdfe commit 666ddda
Show file tree
Hide file tree
Showing 5 changed files with 914 additions and 609 deletions.
6 changes: 6 additions & 0 deletions .changeset/odd-gorillas-cough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@firebase/firestore': minor
'firebase': minor
---

Enable queries with range & inequality filters on multiple fields.
247 changes: 245 additions & 2 deletions packages/firestore/firestore_composite_index_config.tf
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,36 @@ locals {
},
]
index9 = [
{
field_path = "testId"
order = "ASCENDING"
},
{
field_path = "a"
order = "ASCENDING"
},

{
field_path = "b"
order = "ASCENDING"
},
]
index10 = [
{
field_path = "testId"
order = "ASCENDING"
},
{
field_path = "b"
order = "DESCENDING"
},

{
field_path = "a"
order = "DESCENDING"
},
]
index11 = [
{
field_path = "testId"
order = "ASCENDING"
Expand All @@ -128,7 +158,7 @@ locals {
order = "ASCENDING"
},
]
index10 = [
index12 = [
{
field_path = "testId"
order = "ASCENDING"
Expand All @@ -146,7 +176,7 @@ locals {
order = "ASCENDING"
},
]
index11 = [
index13 = [
{
field_path = "rating"
array_config = "CONTAINS"
Expand All @@ -164,5 +194,218 @@ locals {
order = "ASCENDING"
},
]
index14 = [
{
field_path = "testId"
order = "ASCENDING"
},
{
field_path = "key"
order = "ASCENDING"
},
{
field_path = "sort"
order = "ASCENDING"
}
]
index15 = [
{
field_path = "testId"
order = "ASCENDING"
},
{
field_path = "key"
order = "ASCENDING"
},
{
field_path = "sort"
order = "ASCENDING"
},
{
field_path = "v"
order = "ASCENDING"
}
]
index16 = [
{
field_path = "testId"
order = "ASCENDING"
},
{
field_path = "v"
order = "DESCENDING"
},
{
field_path = "key"
order = "DESCENDING"
},
{
field_path = "sort"
order = "DESCENDING"
},
]
index17 = [
{
field_path = "v"
array_config = "CONTAINS"
},
{
field_path = "testId"
order = "ASCENDING"
},
{
field_path = "key"
order = "ASCENDING"
},
{
field_path = "sort"
order = "ASCENDING"
},
]
index18 = [
{
field_path = "key"
order = "ASCENDING"
},
{
field_path = "testId"
order = "ASCENDING"
},

{
field_path = "sort"
order = "DESCENDING"
},
{
field_path = "v"
order = "ASCENDING"
},
]
index19 = [
{
field_path = "testId"
order = "ASCENDING"
},

{
field_path = "sort"
order = "DESCENDING"
},
{
field_path = "key"
order = "ASCENDING"
},
{
field_path = "v"
order = "ASCENDING"
},
]
index20 = [
{
field_path = "testId"
order = "ASCENDING"
},
{
field_path = "v"
order = "ASCENDING"
},

{
field_path = "sort"
order = "ASCENDING"
},
{
field_path = "key"
order = "ASCENDING"
},

]
index21 = [
{
field_path = "testId"
order = "ASCENDING"
},
{
field_path = "sort"
order = "DESCENDING"
},
{
field_path = "key"
order = "DESCENDING"
},

]
index22 = [
{
field_path = "testId"
order = "ASCENDING"
},
{
field_path = "v"
order = "DESCENDING"
},
{
field_path = "sort"
order = "ASCENDING"
},
{
field_path = "key"
order = "ASCENDING"
},
]
index23 = [
{
field_path = "testId"
order = "ASCENDING"
},
{
field_path = "name"
order = "ASCENDING"
},
{
field_path = "metadata.createdAt"
order = "ASCENDING"
},
]
index24 = [
{
field_path = "testId"
order = "ASCENDING"
},
{
field_path = "name"
order = "DESCENDING"
},
{
field_path = "field"
order = "DESCENDING"
},
{
field_path = "`field.dot`"
order = "DESCENDING"
},
{
field_path = "`field\\\\slash`"
order = "DESCENDING"
},
],
index25 = [
{
field_path = "testId"
order = "ASCENDING"
},
{
field_path = "v"
order = "ASCENDING"
},
{
field_path = "key"
order = "ASCENDING"
},
{
field_path = "sort"
order = "ASCENDING"
},
]
}
}
Loading

0 comments on commit 666ddda

Please sign in to comment.