I will describe my problem as simple as possible, so we have a index which stores product details, but we have 2 primary keys one is product id (unique for every product) and other is city id (we need city id because we store price in city level). '
''
Document structure {ProductId, cityId, specs, price}
'''
Because of this structure search is working very fast but issue is rising while updating the index, we use queue to maintain our update events and thing is we cannot go parallel because of version conflicts (we tried it when specs were updating simultaneously a price update came and this resulted in conflict), we have to use only one queue because of this issue and this queue contains arround a million events which takes very long to get consumed and this gets worse in addition of more daily events. Also specs data is getting replicated for each city.
We were thinking to restructure this index and make two indices of city and product and join the result using linq. But search will not be as fast as before.
So anyone got any better solution or any suggestions in this solution, any suggestions is appreciated.
We tried parallel queue updates but they resulted in conflicts and creation of dlqs.