Closed AlexisWilke closed 5 years ago
I found the location of the error in the elasticsearch
code and reported it here:
https://github.com/elastic/elasticsearch/issues/36234
It's actually the number of Replicas that is the cause of the error and NOT the number of Shards. So the message is confusing at the moment. The bug report is asking the authors of elasticsearch
to fix that glitch.
Okay, I found my problem. I had to use the data center information in the ORM options as follow:
ormOptions: {
defaultReplicationStrategy: {
class: 'NetworkTopologyStrategy',
DC1: 1
}
}
When you switch from the default to using elasticsearch
, you need to switch to NetworkTopologyStrategy
and to specify the replication you need to do it here with the name of the data center and the replication factor as shown above.
You can't use the replication_factor
along NetworkTopologyStrategy
so that's why you have to name the data center. I though that would come directly from the setup files (namely cassandra-topology.properties
and cassandra-rackdc.properties
) but that's not the case. You have to be explicit in the ORM options as well.
When you do not include that replication factor information, as in:
ormOptions: {
defaultReplicationStrategy: {
class: 'NetworkTopologyStrategy'
}
}
you get a replication factor of zero (0) and then get the error I mentioned above.
(See also #167)
I turned on support for ElasticSearch.
But when I try to run for the first time (I just started with a brand new database), I get the following error about shards:
Looking for a solution, I saw a few things such as this command line:
But that fails too:
I also tried with "my_search" as the index name (instead of "_all"). Same results.
Looking at the Elassandra code, I see that this is what breaks. The
create_index()
call.