Hi there,
I have an issue, and I'm considering using ES to solve it.
I will try to simplify the use case at maximum (context = ecommerce) :
I have currently two tables in my mysql database.
- One is a product table.
- The other one is a relation table which contains : product_id, customer_id, scoring
That other table is becoming huge (500 millions records ~), and it's beginning to give some performance issues. I've been advised to try moving this to ES, since "it's made to handle huge quantity of data".
So I can move product table to ES, that's not a problem.
I can also move the relation table to ES, that's not a problem either.
However, I need to be able to query the product table with filtering on both table (for instance : get the list of product where product.color = blue and relation.scoring = 2 and relation.customer_id = X). Which requires a joining mechanism. I read that's not an option on ES, and we should use nested fields instead. But with my amount of data, that does not seems wise, each product document would be too heavy, right ?
I also read that using aliases could solve my issue, but after reading the documentation, it seems aliases are meant to be used for indices that have the same schema, but I'm not sure I get it right...
The other option I see is to perform 2 queries, and then merge the results, but it doesn't seem a good solution..
What do you think, can this be done somehow with ES ?
Note : calculating the scoring on the fly (without storing it anywhere) is not an option