Hello
I'd like to find out what your thoughts are on the following use case:
- We have a service that indexes thousands o products from each of our individual client's
- Those clients buy monthly an amount of credits
- Each time an user clicks a product of a specifc client their credits get subtracted of 1 unit
- Our goal is to use this "credits" attribute as a feature (rank feature?) that incluences relevance on each query
So, how would you model this?
- An index "products" in which each document represents a product. The document would have a "credits" field that represents the amount of credit of the client for that month.
Don't think this would be scalable... For every click we would have to update every document of that client (thousands).
- A nested/join relationship between a parent "client" index an its relative "products".
With this I'd keep the "credits" value only in the parent document (client).
How good would the performance of this be?
- Like (1), but without updating all the documents for every click, but like once a day instead.
Do you have any other approach you could suggest?
Thank you