我们有2个查询应返回相同的结果。但是第二个查询返回的结果要少得多,有时候没有结果。这些是2个查询:
SELECT * FROM statistics WHERE source = 'toutiao' AND timespan = '3';
SELECT * FROM statistics WHERE source = 'toutiao' AND timespan = '3' AND text = '{ sort: {fields: [{field: "speed", reverse: true}]}}';.
我们使用此自定义cassandra索引https://github.com/Stratio/cassandra-lucene-index。
否则你有更好的选择吗?
谢谢你的帮助!
答案 0 :(得分:3)
它已在https://github.com/Stratio/cassandra-lucene-index/issues/259解决。
简而言之,SELECT COUNT
子句正在使用内部分页,即not supported before 3.6.0 release。
解决方案是禁用分页或更新到新版本。
答案 1 :(得分:1)
否则你有更好的选择吗?
Cassandra 与 Apache Solr 的整合称为 DSE Search 。但显然它不是免费的
除了Stratio Lucene索引实现之外,我所知道的唯一其他现有的开源Lucene索引是 Stargate Core 。我不确定它是成熟还是生产就绪,他们的github看起来很空闲(最后提交= 2015年10月)