Hi, first of all, thanks you for this great tool you are building.
I am a beginner with some basis. I have been searching for an answer before posting but sadly I didn’t find anything really matching what I needed.. It probably already exist though.
I need to think about the best way to build my indexes and I can’t figure out what would be the best solution among the options I can think of.
(I am using the Elastic 6.2
)
I have a lot of user objects (U) who own 4 types of objects (A,B,C,D), let say 10 objects of each type for each users.
Important details :
- Each time I ask data to ElasticSearch, I need data from each A, B, C and D, let say 40 of each… It can be considered as 4 independants queries.
- The user data are only used when calculating the score to get A B C and D.
- I need to make queries very often.
- I don’t need to reindex everything regularly, I can be sharp on this and target the right documents.
- I am dealing with small documents
These are the solutions I can think of...
Solution 1 :
Parent-child index using join. U == Parent A, B, C or D == childs
Solution 2 :
User index incorporating 4 Nested relationship (A, B, C, D) :
Solution 3:
Split the data in 4 parent-child indexes A, B, C, D (then replicating the user data)
Solution 4:
Split the data in 4 Nested indexes… similarly
Solution 5 :
Just forget about redundancy problem and put the user data in each objects since the documents are not big… (Which is the simplest... Then with one or four indexes ?)
Thanks again !