Design approach for counting friends unique category counts

Hello All ,

I just started using Elastic Search and It is simply awesome . I am looking for a best design approach for my case .

In the below Index , Friends and all categories are numeric arrays . I can have up to 5000 friends and categories also arrays and they can have max 15 for each category . If I have 5000 friends and If my one of the category changes ( for example category 1 changes ) I have to count "Friends Category1 counts" for my all 5000 friends and update their counts .

Is there any way I can use Painless script and do it with one call ..? Or please guide me the best approach to handle this case

I use Nodejs for my backed .

Thank You
Kiran

Sorry to bug you guys again . Do I have to read all the friends Id's into my server side code and update each one by one ..? Any best approach you guys can suggest me ?

Thanks for your help
Regards

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