I can't find a way to do the following with ElasticSearch:
- I have 2,000,000 items indexed in ElasticSearch
- I have 30,000 players saved in MySQL
Every item has the name of a player as an attribute. The online status of these players changes every 15 minutes, and can be true or false (obviously).
I would like to be able to show only items for online players.
I don't think I can index the online status with the item, since it changes so often. I can't really get all the ids of the online players and use that as a filter since there are so many.
Would it help to index players in ElasticSearch as well? Is it possible to do some kind of JOIN
with another index?
edit: After looking more into how doing joins with ES, I found out that it's actually possible with has_child if I index players in ES. Tire does not have a method for has_child
, but is possible to do it with the existing DSL?