Here is my query:
select * from profiles where expr(profiles_index, '{
filter: {
type: "date_range",
field: "age",
from: "1984/01/01",
to: "2010/01/01",
operation: "is_within"
}
}');
Here is my table:
CREATE TABLE profiles (
user_id timeuuid,
age timestamp,
PRIMARY KEY (user_id)
);
and my schema looks something like this:
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"
}
}
}'
};
AND i'm getting this exception:
Traceback (most recent call last): File "/opt/apache-cassandra-3.0.3/bin/cqlsh.py", line 1249, in perform_simple_statement result = future.result() File "/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", line 3122, in result raise self._final_exception ReadFailure: code=1300 [Replica(s) failed to execute read] message="Operation failed - received 0 responses and 1 failures" info={'failures': 1, 'received_responses': 0, 'required_responses': 1, 'consistency': 'ONE'}
Does anyone know why I might be getting this error?
I needed to use a "Range" search, not a "Date Range" search. If you use a "Date Range" search, you better have used a "Date Range Mapper".