We are planning to use elasticsearch to store merchant profile details and summary of his transaction amount. We have to update document for every transactions to maintain the total amount in sync.
Thanks in advance.
Please find the answers inline:
It's very subjective and based on various parameters like how many documents in your index, how many shards, how many data nodes and what is your write QPS etc, Elasticsearch is very scalable and if you tune your cluster and index, you can get very high throughput without any issues. If you provide more details, we can suggest how to tweak this for a write-heavy system like yours. Please refer ES blog for tunning the indexing speed
Yes, even if you update a field, internally elasticsearch marks the old document deleted(soft deleted) and creates a new document and later on during segment merging old deleted document is actually deleted. More info on the partial update of ES is covered in detail by Elastician in this SO answer
It depends, if while querying you need to look in both the index( types are deprecated in the latest version ), then it doesn't make sense to create two indexes, as denormalized data will give a better search performance.
Also creating two indices with a join will be a bit complex to implement, and anyway as you need to frequently update the transaction data for the author, which would have the most of the sellar data and updates on the big index is more costly, so even if you save updates on profile index but still as it would be very small, IMHO it wouldn't give much better performance but that you can test with some stress testing.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.