Shawn Tan
07/31/2025, 5:34 PM"Failed to join on `collection_2_alias`: No reference field found`
I've confirmed that re-creating the exact same collections without aliases leads to the queries behaving as expected. This only happens with aliases.Alan Martini
07/31/2025, 5:37 PMShawn Tan
07/31/2025, 5:46 PMShawn Tan
07/31/2025, 6:27 PMAlan Martini
07/31/2025, 7:00 PMbooks_collection = books2932423
books_alias = books
{
"name": "authors",
"fields": [
{"name": "name", "type": "string"},
{"name": "author_books", "type": "string", "reference": "books.id"}
]
}
In this case, if you create a new books collection and reference it as the new alias, the collection authors
that will lose the reference and you must reindex authors
.
Do you mean even with a freshly created set of referencee and referenced this happens? Without changing alias?Shawn Tan
07/31/2025, 7:06 PMbooks_collection
{
"name": "books",
"fields": [{"name": "title"}]
}
authors_collection
{
"name": "authors",
"fields": [
{"name": "name", "type": "string"},
{"name": "books_written", "type": "string[]", "reference": "books.id", "async_references": true}
]
}
and then create the aliases
aliases = {
"books" -> "books_collection"
"authors" -> "authors_collection"
}
and this query on books fails
{
"q": "*",
"query_by": "title",
"filter_by": "$authors(name:[Rowling])"
}
Now that i'm writing it, seems like the fact that the reference was created before alias assignment might be causing an issue? But I'm using async references because dependency might not be a DAGAlan Martini
07/31/2025, 7:28 PMShawn Tan
07/31/2025, 7:29 PMShawn Tan
07/31/2025, 7:44 PMAlan Martini
07/31/2025, 7:51 PMShawn Tan
07/31/2025, 10:13 PM