Skip to content

Unable to detect nested object attribute from the resolver results #49

@kokqing

Description

@kokqing

Hi,
I had created my zentity model which include some nested object of array attributes to be resolved.
However when I run the resolution, the _attributes list that was return from the result only include those attribute that was declared at the root level of the document.

Those nested object attributes were not being detected thus those nested object array attributes could not be used for subsequent recursive resolving traversal.

Is there anyway to do this? Thanks

E.g
{ "attributes": { "firstName": { "type": "string" }, "lastName": { "type": "string" }, "licenseNumber": { "type": "string" } }, "resolvers": { "name": { "attributes": ["lastName", "firstName"] }, "license": { "attributes": ["licenseNumber","firstName"] } }, "matchers": { "exact": { "clause": { "term": { "{{ field }}": "{{ value }}" } } }, "exact_license_nested": { "clause": { "nested": { "path": "license", "query": { "term": { "{{ field }}": "{{ value }}" } } } } }, "fuzzy": { "clause": { "match": { "{{ field }}": { "query": "{{ value }}", "fuzziness": "auto", "operator": "AND" } } } } }, "indices": { "my_index": { "fields": { "firstName": { "attribute": "firstName", "matcher": "fuzzy" }, "lastName": { "attribute": "lastName", "matcher": "fuzzy" }, "license.number.keyword": { "attribute": "licenseNumber", "matcher": "exact_license_nested" } } } } }
When I run the resolution, the result _attributes portion will only consist of
firstName, lastName but not licenseNumber although license.number is inside the document in the form of

license:[{number:1},{number:2}].
Having this will only result in traversing the "name" resolver but not the "license" resolver for subsequent hops.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions