Hi there! I'm trying to reproduce the "specialized...
# community-help
n
Hi there! I'm trying to reproduce the "specialized example" on the join section, version 27.1 and I have some doubts. The idea is to link two collections, one for products and one for price of products, because I have specific price for each customer. Schema prices
Copy code
{"name": "id_product", "type": "string", "reference": "products.id_product"},
{"name": "customer_id", "type": "string"
{"name": "price", "type": "float",},
Schema products
Copy code
{"name": "id_product", "type": "string"},
            {"name": "name", "type": "string", },
            {"name": "info1", "type": "string"}
Then I query using:
Copy code
{
  "q": "*",
  "collection": "products",
  "filter_by": "$prices(custom_price:<100)"
}
And it gives me errors like: •
id_product_sequence_id
is not present in index. Am I missing something on configuring/understading these joins? Are there another resources where I can understand a little bit better about these operations? Thank you so much.
j
Could you make sure you're using 28.0.rc37 or above and see if you can replicate the issue?
Also, we don't support enabling references via alter, so you want to create new collections if you use the JOIN feature
āœ… 2
n
@Jason Bosco thank you, i'll try. I'm also recreating the collections everytime to not incur this problem.
@Jason Bosco good evening! I was able to implement the joins in v28! Thank you! I've a specific question. For example, if my join return more than 1 document, it shows as $Table : [ {docs}, {docs}], but if it returns exactly 1 document, it shows $table: {docs}. Wont it make the sorting and related queries problematic/inconsistent? For example, how would I sort by a value inside $Table? Thank you!
j
We currently don't allow sorting when a join produces multiple joined references. But we plan to solve for this shortly, by allowing you to specify which of those joined references to use for sorting
āœ… 1
n
Awesome! Thank you
@Jason Bosco hi there! Will this be included on v29? Is there already a release date? Thank you in advance!
f
This is being actively worked on, and I'll inform you when we have an RC with it
šŸ™Œ 1
n
Thank you very much!
f
It's just been merged @Nicolas https://github.com/typesense/typesense/pull/2258 It will be available in the next RC build
šŸ™Œ 1
n
Thank you so much @Fanis Tharropoulos! Eager to see it working šŸ™‚