Elassandra support not working
Opened this issue · 1 comments
neven95 commented
My configuration looks like this
var models = ExpressCassandra.createClient({
clientOptions: {
contactPoints: ['127.0.0.1'],
protocolOptions: { port: 9042 },
keyspace: 'strat_history_keyspace',
queryOptions: { consistency: ExpressCassandra.consistencies.one },
elasticsearch: {
host: 'http://localhost:9200',
apiVersion: '6.2.3',
sniffOnStart: true,
}
},
ormOptions: {
manageESIndex: true,
defaultReplicationStrategy: {
class: 'SimpleStrategy',
replication_factor: 1
},
migration: "drop",
}
});
but when I tried search like this(HistoryDB==models)
HistoryDB.instance.Smoke.search({
q: 'day:31',
}, function(err, response) {
if (err) throw err;
});
I got an error : err while create or update: Error: To use elassandra features, set manageESIndex
to true in ormOptions
AlexisWilke commented
The replication class has to be 'NetworkTopologyStrategy' (which in turn prevents the use of the 'replication_factor' parameter)
You probably should try to restart from scratch with your database to make sure it works as expected, although I'm here because I also get an error which I don't know how to resolve... see #184
The full declaration must include the data center name and replication factor:
defaultReplicationStrategy: {
class: 'NetworkTopologyStrategy',
DC1: 1
},