Hi, I would like to ask if it's possible to index ...
# community-help
z
Hi, I would like to ask if it's possible to index a field with the
reference
property to an existing collection? For example:
Copy code
client.collections('books').update({
    "name": "author_id",
    "type": "string",
    "reference": "authors.id"
})
f
Yup, although you have to pass in the
fields
property first inside the update function
z
Yup got it. It's a typo when writing this question. However, I got this error when trying to index this field to my existing collection: RequestMalformed: Request failed with HTTP code 400 | Server said: Adding/Modifying reference field
lead_contact_linkages
using alter operation is not yet supported. Workaround is to drop the whole collection and re-index it.
I am using v29.0 Typesense
f
Seems like you need to either create an Alias and migrate the data over, or drop the existing collection and re-index everything
z
I see, too bad, I was hoping that it can be index on the go without migration / re-indexing. There was no mention of this in the documention. So that means this is an intended behavior and not a bug right?
f
Yeah, JOINs are being worked on continuously, will add a note in the documentation for collection updates
z
Sure, thanks for your prompt reply!
h
👍 1
z
That’s nice! Hopefully it can be merged