We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parent of nested object array is the array of object itself and not the parent object
Create collection
{ "name": "vids", "fields": [ { "name": "tags.id", "type": "string[]", "facet": true } ], "enable_nested_fields": true }
Import a document
{ "tags": [ { "id": "tag-1", "name": "name of tag 1" }, { "id": "tag-2", "name": "name of tag 2" } ] }
Search with facet
q: * facet_by: tags.id facet_return_parent: tags.id
http://127.0.0.1:8108/collections/vids/documents/search?q=*&facet_by=tags.id&facet_return_parent=tags.id
Result
"facet_counts": [ { "counts": [ { "count": 1, "highlighted": "tag-2", "parent": [ { "id": "tag-1", "name": "name of tag 1" }, { "id": "tag-2", "name": "name of tag 2" } ], "value": "tag-2" }, { "count": 1, "highlighted": "tag-1", "parent": [ { "id": "tag-1", "name": "name of tag 1" }, { "id": "tag-2", "name": "name of tag 2" } ], "value": "tag-1" } ], "field_name": "tags.id", "sampled": false, "stats": { "total_values": 2 } } ],
Parent of tag-1 shoud be :
tag-1
{ "id": "tag-1", "name": "name of tag 1" }
Parent of tag-2 shoud be :
tag-2
{ "id": "tag-2", "name": "name of tag 2" }
Looks like the parent is the complete tags field, and not the tag object itself.
tags
Typesense Version: 26.0
OS: ubuntu
The text was updated successfully, but these errors were encountered:
This is fixed in 27.0.rc14.
27.0.rc14
Sorry, something went wrong.
No branches or pull requests
Description
Parent of nested object array is the array of object itself and not the parent object
Steps to reproduce
Create collection
Import a document
Search with facet
http://127.0.0.1:8108/collections/vids/documents/search?q=*&facet_by=tags.id&facet_return_parent=tags.id
Result
Expected Behavior
Parent of
tag-1
shoud be :Parent of
tag-2
shoud be :Actual Behavior
Looks like the parent is the complete
tags
field, and not the tag object itself.Metadata
Typesense Version: 26.0
OS: ubuntu
The text was updated successfully, but these errors were encountered: