Skip to content
New issue

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

[Feature Request] Add support for faceting on joined reference fields #1706

Open
mbombonato opened this issue May 3, 2024 · 1 comment
Open

Comments

@mbombonato
Copy link

Description

Consider the following schemas:

{
  "name":  "books",
  "fields": [
    {"name": "title", "type": "string"},
    {"name": "author_id", "type": "string", "reference": "authors.id"}
  ]
}

{
  "name":  "authors",
  "fields": [
    {"name": "id", "type": "string"},
    {"name": "name", "type": "string"}
  ]
}

I'd like to request a facet for the field "name" of the referenced collection "authors"

{
	"collection": "books",
	"include_fields": "$authors(name)",
	"q": "famous"
	"facet_by": "$authors(name)"
}

Expected Behavior

Return the results with a facet for the field "authors.name"

Actual Behavior

{
	"message": "Could not find a facet field named `$authors` in the schema."
}

Metadata

Typesense Version: 26

OS: any

@mbombonato
Copy link
Author

I'd like to add the importance of this feature. I was about to change my data model to use the new JOIN feature of the Typesense 26. This would save us a huge amount of indexing time and data storage. Now I have to wait until this feature is released, because we need faceting working for referenced collections :(

Adding support for JOINs was immense new feature, but still incomplete without the proper faceting support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants