Linked Data

Author: melishevCreated Jul 23, 2025Updated Sep 24, 2025

I want to ask this question, as for several days I have never been able to find an exact answer to it in the documentation.

I have three entities in a project - A, B, C. B and C look like:

javascript
{
 id: <uuid>,
 title: 'awesome title',
 ...
}

A looks like:

javascript
{
 id: <uuid>,
 title: 'awesome title',
 title2: 'awesome title2',
 b: <B uuid>
 c: <C uuid>
}

As you can see, A refers to B and C. What is the best way to implement data indexing in the project to implement a search on A so that A.title, A.title2, A.b.title, A.c.title can be searched?

I see that for such cases there is new Document(), but I am confused that when creating an index I will need to collect every A, and there can be really many of them. I'm also confused that in this case, if B referenced by A changes the title, then I will have to re-index all those who are related to it.

Is there any possibility to index B and C in separate indexes, which would get rid of all the problems, but at the same time somehow combine them when searching for A?