0

I am currently trying to set up cross-cluster-replication for Opensearch in Apache Unomi. My idea was the following: We have two data centers, dc1 and dc2. So I changed Unomi so that on dc1 it creates indices in the form of dc1-<indexname>-index and it creates aliases called <indexname>, e.g. dc1-context-actiontype-index with the alias context-actiontype. On dc2 the indices are then called dc2-<indexname>-index.

While running the integration tests of Unomi I noticed that this request is fired among others: GET /context-persona/ doc/europeanVisitor , which leads to the following exception: "illegal argument exception", "reason": "alias [<indexname>] has more than one index associated With it [dc1-<indexname>-index, dc2-<indexname>-index], can't execute a Single index op".

Now the question is: Is it somehow possible in Opensearch to read documents from both indices using the alias, or I would have to implement all the logic for reading from aliases and then handling each associated index in Unomi itself ?

Phreneticus
  • 349
  • 2
  • 11
  • Your title mentions Opensearch while your question states Elasticsearch. Those are two different products, especially when it comes to cross-cluster replication. Can you please clarify? – Val Jul 17 '23 at 14:29
  • @Val You're right of course. The whole question is related to Opensearch rather than Elasticsearch. I changed my question accordingly – Phreneticus Jul 17 '23 at 16:12
  • Cool, thanks for confirming I've updated the tags accordingly Not sure the `java` tag is appropriate though – Val Jul 17 '23 at 16:14
  • I added the java tag, since Unomi is a Java application and I did all the index changes within Unomi in Java. – Phreneticus Jul 18 '23 at 08:14
  • Fair enough, I guess... – Val Jul 18 '23 at 08:32

0 Answers0