Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Send contributor events from instance to the search.instance-contributor topic (message key = sha1 hash of concatenatination - tenantId + contributorType contributorTypeNameId + keyname)
  2. 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)
  3. Implement a new InstanceContributor repository with following upsert request for events groups
  4. 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 threated 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

...

ProsCons

Approximately, the same performance as Call-Number Browsing.

Additional value must be stored within each document - numeric value for each contributor
No need to store dedicated Elasticsearch index, PostgreSQL table or indexThere is no way to collect facets for contributor type/name

Filter contributors by type will be hard too

In case of large collisions (2000-3000 resources per contributr) - response will be slow