Skip to content

Commit 4f8f8be

Browse files
authored
Fix Paginate(Keys()) max width (#1)
when running the bellow query in a database that contains many keys, it results in a bad request ``` > Paginate(Keys(), {size: 10}) Error: bad request { errors: [ { code: 'bad request', description: 'Query exceeds max width. Max: 100000, current: 118986.' } ] } ``` even the `size` parameter is being ignored. Turns out the Union of the indexes is not necessary as `DocumentsByCollection` will return all keys anyway.
1 parent feb75fc commit 4f8f8be

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

ext/model/src/main/scala/set/IndexSet.scala

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,9 @@ object SchemaSet {
8282
extends SchemaSet(
8383
scope,
8484
KeyID.collID,
85-
Union(
86-
Seq(IndexJoin(Databases(scope), KeyByDatabase(scope)),
87-
IndexSet(
88-
DocumentsByCollection(scope),
89-
Vector(IndexTerm(DocIDV(KeyID.collID.toDocID)))))))
85+
IndexSet(
86+
DocumentsByCollection(scope),
87+
Vector(IndexTerm(DocIDV(KeyID.collID.toDocID)))))
9088

9189
case class Tokens(scope: ScopeID)
9290
extends SchemaSet(

0 commit comments

Comments
 (0)