Hello team! I have 2 questions regarding the `type...
# community-help
g
Hello team! I have 2 questions regarding the
typesense-java
library. Using
v1.3.0
1. Trying to use the JOIN feature, but found an obstacle in the way the referenced field is parsed: a. the naming of the referenced collection is namespaced, using this pattern -> namespace.x b. when referencing the field y, on the definition of the collection using
Field().reference("namespace.x.y")
, I get the error that collection “namespace” is not found c. I get that the string is split in the first dot, so can’t get the correct collection name, does anybody know any way to escape this? 2. Is there any way to enable async joins through the library api?
f
Hey Grigoris, 1. Could you elaborate on the namespaced part? Typesense will only throw this error if the referenced collection isn't found. Collection naming has to be explicit, otherwise you can use an Alias. If you can, provide a simple reproduction script using curl like this one, so we can debug. 2. The Java client relies on the API spec, which was missing the
async_reference
property. I just added a PR there to include it, and we'll release a new version with it
g
1. @Fanis Tharropoulos what I mean is that our collection names follow this pattern ->
namespace.collectionName
. For example the collection
authors
in
production
namespace would be actually named
production.authors
. So when referencing its
id
field, we would have
Field().reference("production.authors.id")
, which would eventually try to find a collection named
production
in typesense. Does this make sense? 2. Thanks a lot! Thank you for the quick reply! 🙏
h
Since Typesense uses
.
to denote the nested fields, and we allow references to them, we can't parse a collection name having
.
correctly. I would suggest you to rename your collection to
production_authors
g
Thank you for the response @Harpreet Sangar! This is probably the correct direction, made a workaround using an alias for the moment!
🙌🏼 1
Hello @Fanis Tharropoulos! You mentioned in the previous reply that you were about to release a new version of the client, to support
async_reference
Following up to this, do we have an expected release date for this?
a
~Hey @Grigoris Balaskas We've puxed a GA for v30 to January, due the holidays. But you can find this specific feature in the latest v30.0.rc35: https://typesense.org/docs/30.0/api/#new-features~
f
Hey @Grigoris Balaskas , I've opened up a PR for the latest API spec changes under here: https://github.com/typesense/typesense-java/pull/99 We'll have a release ASAP.
g
Thank you @Fanis Tharropoulos!!