Scenario: in couchbase if I do any update in any personal details couchbase saves it with the employee id and its timestamp. I need to fetch all details similar to a like query such that I want to retrieve all details with timestamps bypassing the employee id only.

For example, if I update one person's details (emp id 12345) in couchbase, it adds one new entry in couchbase where the id is (empid+timestamp). So if I update the details three times then the old two ones will have id looks like id.12345.2020-05-26T13:57:38.1167852+02:00 and id.12345.2020-07-09T06:40:14.6895599+01:00 and the latest one will have id id.12345. Now if someone updates the details again then the earlier latest id.12345 will change to id.12345+timestamp and a new entry will be added with id.12345. I want to retrieve all entries for the person with id 12345 (where id is like id.12345). How to write this kind of dynamic view where I will pass id.12345 from my java code and the view query will return all documents where id start with id.12345

0

There are 0 answers