Cassandra Stratio无法执行读取
我的问题是:Cassandra Stratio无法执行读取,cassandra,stratio,cassandra-lucene-index,Cassandra,Stratio,Cassandra Lucene Index,我的问题是: select * from profiles where expr(profiles_index, '{ filter: { type: "date_range", field: "age", from: "1984/01/01", to: "2010/01/01", operation: "is_within" } }'); 这是我的桌子: CREATE TABLE profiles ( user_id t
select * from profiles where expr(profiles_index, '{
filter: {
type: "date_range",
field: "age",
from: "1984/01/01",
to: "2010/01/01",
operation: "is_within"
}
}');
这是我的桌子:
CREATE TABLE profiles (
user_id timeuuid,
age timestamp,
PRIMARY KEY (user_id)
);
我的模式如下所示:
CREATE CUSTOM INDEX profiles_index ON profiles ()
USING 'com.stratio.cassandra.lucene.Index'
WITH OPTIONS = {
'refresh_seconds' : '60',
'schema' : '{
default_analyzer : "english",
fields : {
age : {type : "date",
validated : true,
pattern : "yyyy/MM/dd"
}
}
}'
};
我得到了一个例外:
回溯(最近一次调用上次):文件
“/opt/apache-cassandra-3.0.3/bin/cqlsh.py”,第1249行,在
执行简单语句
result=future.result()文件“/opt/apache-cassandra-3.0.3/bin/。/lib/cassandra-driver-internal-only-3.0.0-6af642d.zip/cassandra-driver-3.0.0-6af642d/cassandra/cluster.py”,
第3122行,结果是
自我提升。_final_exception ReadFailure:code=1300[副本未能执行读取]message=“操作失败-收到0
响应和1失败“信息={'failures':1,'接收到\u响应':
0,“必需的\u响应”:1,“一致性”:“一个”}
有人知道我为什么会出现这个错误吗?我需要使用“范围”搜索,而不是“日期范围”搜索。如果使用“日期范围”搜索,最好使用“日期范围映射器”。我需要使用“范围”搜索,而不是“日期范围”搜索。如果使用“日期范围”搜索,最好使用“日期范围映射器”。@user1019182完全正确,“日期范围”搜索旨在与使用“日期范围”映射器索引的数据一起使用,该映射器使用空间方法对由开始日期和停止日期组成的持续时间进行索引 要搜索持续时间内的简单日期,应使用“范围”搜索:
@mahendra singh是错误的,cqlsh默认时间戳格式与此无关 @user1019182完全正确,“date\u range”搜索旨在与使用“date\u range”映射器索引的数据一起使用,该映射器使用空间方法对由开始日期和停止日期组成的持续时间进行索引 要搜索持续时间内的简单日期,应使用“范围”搜索: @mahendra singh是错误的,cqlsh默认时间戳格式与此无关
select * from profiles where expr(profiles_index, '{
filter: {
type: "range",
field: "age",
lower: "1984/01/01",
upper: "2010/01/01",
include_lower: true,
include_upper:true
}
}');