My question is: I have a query with the mongodb find () method. I’m fetching all my users that match the features I specified in the query. As part of my work, I used the k-mean algorithm on my server side to show users returning from mongodb in a clustered fashion. As the number of Acnak users increases, there will be delays in mongodb. To overcome this delay, I want to apply the K-mean algorithm to the last part of the Mongo answer. So users come to me clustered.
I was wondering if anyone knows the exact source code. Where should I add the K-mean algorithm to the final answer section in Mongod?