...
- Send contributor events from instance to the search.instance-contributor topic (message key = sha1 hash of concatenatination - tenantId + contributorType contributorTypeNameId + keyname)
- Implement a new Kafka Listener to listen contributor only events (Kafka will arrange contributors with the same key in the same partition, allowing event processing without optimistic locking)
- Implement a new InstanceContributor repository with following upsert request for events groups
- Implement a query which allows to find contributor exact by name and type (it can be CQL with double equal sign, but it looks like that John and John. are treated as the same value (ES standard tokenizer))
...
No Format |
---|
{ "script": { "source": "def set=new LinkedHashSet(ctx._source.instances);set.addAll(params.ins);params.del.forEach(set::remove);ctx._source.instances=set", "lang": "painless", "params": { "ins": [ "instanceId#1|type#1contributorTypeId#1", "instanceId#2|type#1contributorTypeId#1", "instanceId#3|type#1tcontributorTypeId#1" ], "del": [ "instanceId#4|type#1contributorTypeId#1"] } }, "upsert": { "id": "abshc", "name": "Antoniou, Grigoris", "contributorTypeIdcontributorTypeNameId": "type#1contriboturTypeNameId", "instances": [ "instanceId#1|type#1contributorTypeId#1", "instanceId#2|type#1contributorTypeId#1", "instanceId#3|type#1contributorTypeId#1" ] } } |
#2 Browsing by Contributors using PostgreSQL table
...