Answering both issues;
1- what happens if the node 1 having half part of the index fails or goes down, does the queries using the partitioned index end with an exception or error?
[cb]if you have a primary index or another secondary index that can be used for the scan, the query will work fine but without this index, your query response time may vary if the other indexes are not as useful.recommendation is to mirror the index partitions. **
2- is it possible to specify an index replication in another node for each partitioned index?
[cb]we don’t support replication/replicas with GSI but you can manually do this. The way to do this would be to create the 2 identical indexes on 2 separate nodes (a.k.a mirror the index). If one node fails and takes out one copy of the index, all traffic will hit the remaining available index.
3- Is it possible to specify more than one node having one single index partition?
[cb]not at this time. you need to name each index differently. index name in a given bucket has to be unique so we require separate statements for each index and each mirror with CREATE INDEX
Now about the index maintenance;
3- when the index will e candidate for a rebuild?
[cb]there isn’t a reason to rebuild the indexes unless you want to move them to another node or want to change their definitions.
4- for the query optimization ; is it a rule based optimization or a cost based?
[cb]rule based at this point
for your example on the previous post: At the moment, we don’t support specifying multiple nodes clauses for a single index. you can do the following;
CREATE INDEX IX_TYPE_PART1 ON product(Type) WHERE Type=“p1” USING GSI
WITH {“nodes”:“10.71.52.142:8091”};
CREATE
INDEX IX_TYPE_PART2 ON product(Type) WHERE Type=“p1” USING GSI WITH
{“nodes”:“10.71.52.138:8091”};