-
-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elassandra support broken #195
Comments
Up. Elassandra support is still broken. It seem to be pretty deep, I think it would need several fixes. Are there people motivated to try to patch this together? I have already roughly located the problem. The error appears in the base_model.js file: However it source seem to be in the in lib/orm/apollo.js As one can see there is no elastic search client, it is because it is in fact never created. The apollo classe defined several methods which use others state variable _this1 and _this2 which are copy (and not reference) from this, so finally the this.esclient do not exist. It may be due to a change of js behaviour with the versions of node. Its existence is easily patched, however elasticsearch indexing ask for more work, and I am quite blocked for now. |
@Sayah-Sel which version of node and elassandra you're trying with? Currently only elassandra version 5.5.x is supported. For v6 there was a pending issue in elassandra that was needed to be fixed to keep it supported: But it looks like the elassandra project is no longer actively maintained and the issue is still open there. |
I use Elassandra 5.5.0.22 And node 16.18 So Elassandra is also abandoned, I suspected it a little but not much... |
@masumsoft and btw, thank you for your answer! To be honest I am quite relief to discover that YOU did not abandonned express-cassandra, I feel less alone in this World 😅😅 I don't feel like I am using advanced features of Cassandra/Elassandra/Elasticsearch/Express-Cassandra, so if it is only a problems of version on those I should be able to use a more ancient without problems. But change my node version would certainly be much harder, but perhaps not unfeasible. When I begun my app I thought backend code was the more difficult, but with time its look more and more like copy-past each time i create a new controller file and Cassandra table. So a change of node version may break all my code, but nothing definitive... But anyway, I would prefer a way of make everything work if the newest versions possibles of everyone. A project that is stuck on ancient version is condemned with time it can only become less and less competitive... (not as simple as that now that I hear that Elassandra is abandonned, that's a big problem...) Another question for now, did you read about the support of Vector Search in Cassandra 5.0 ? Do you think in my replace efficiently Elastic-Search and so Elassandra ? If so it would be much more reliable as it is a core part of the Cassandra project, and not a distinct project. |
Anyway, to continue on more serious considerations. I try to understand how you intend to get the elasticsearch clients created. And I was not able too. ES and Janus Graph clients seem to be handled as "managementTasks" only in a init callback:
... I don't get when this is called (but I know it is, as I putted a console.log inside...), however it seem that this._esclient loaded in baseProperties is still null. So i tried to create one myself on the model of create_es_client and assert_es_index functions:
` So now, I have a client, I can call it, and send ES queries. It works... Except that the queries does not find anything, however, there is actually hope. Because I just discovered that if I follow the following exemple of the doc (with model name) and call myself the client and provide type and index field it works: `
` Not so bad, I suppose, I just feel like I am missing something. |
express-cassandra error:
To use elassandra features, set "manageESIndex" to true in ormOptions
manageESIndex
has been set totrue
in the config.Here is my config for reference
The text was updated successfully, but these errors were encountered: