Skip to content

Wildcards at index root #86

@ThePhantomLemon

Description

@ThePhantomLemon
db.indexes.create("*/media", "timestamp") 
.then(() => {
    return db.query("*/media") /
      .take(100)
      .sort("timestamp", false)
      .get();
})
.then((postSnapshots) => {
      console.log(postSnapshots)
});

The above code returns an error from line 1095 in data-index.js. specifically this line:

const wildcardValues = childPath.match(wildcardRE).slice(1);

match() is returning null so of course it errors when trying to call slice().
Presumably I should have my data just be 1 level deeper.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions