Skip to content

Two queries by nested fields return duplicated result #79

Open
@nomshar

Description

@nomshar

So there is a document
{ "top-field": "abc", "nested-fields": { "field1": "value", "field2": "" } }

I'm sending two queries:
const itemsA = this.findByFields({ "nested-fields.field1": "value"}); const itemsB = this.findByFields({ "nested-fields.field2": "value"});

itemsB contains data, but shouldn't.

The issue, as I realized, comes from cache.js orderDocs and getNestedValue method.
It processes correctly filters like { nested-fields: { field1: "value" }}, but cannot process concatenated fields.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions