Are there any proper alternatives to "Join" queries in ElasticSearch?

Hi everyone,

We are seeking advice on a situation which may need elasticsearch "join" queries.
It is basically a subscription system.
Different users may subscribe the same item, so we want to save the users data against the item.
We have done a bit research on parent/child relationship, but which has many restrictions - e.g. parent&child must be in the same shard and they should have the same field mappings.

We also did a look at terms lookup, but it looks like the size of terms lookup could not satisfy our needs.

Now we are saving the user ids in an array field and doing a partial update every time when users data changes, but there is another issue - all fields not included in _source will be discarded after partial update. Including all fields in the _source may have a performance penalty ( correct me if I am wrong). Doing a full update needs extra database hits.

I'm really struggling with the "join" query at the moment. Parent/child relationship might be the best alternative, but I'm not sure how the performance tax would be if the data volume becomes huge in future. 1 billion items and each item has 50,000+ users associate it. Any advice is welcome.



This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.