他们的任何方式来使节点“stratio cassandra-lucene-index”查询js

问题描述:

我正在使用“stratio cassandra-lucene-index”插件进行空间查询以下cassandra是我的查询,我从cqlsh和做工精致,他们的任何方式来使节点“stratio cassandra-lucene-index”查询js

SELECT * FROM user_location WHERE expr(user_location_index, '{filter:{type:"geo_distance", field:"place", latitude: 28.6076, longitude: 77.3683, max_distance:"20km"}, sort:{field: "place", type: "geo_distance", latitude: 28.6076, longitude: 77.3683}}'); 

我的问题是如何使从Node.js的这个上面的查询,我使用Cassandra的驱动程序为其他查询,任何建议表示赞赏。

由于卡桑德拉3.x中,二级索引查询语法改变从:

SELECT * from table where lucene='query'; 

到:

SELECT * from table WHERE expr(index_name,'query'); 

但是,没有人已经采用了这种查询类型,但(火花卡桑德拉连接器。 ..)。所以我们仍然允许使用旧式的查询语法。

参考文献:Alternative syntaxes