in Cassandra i am trying to retrieve text data from table using >=
operation but , nothing retrieved although trying to use =
it returns successfully
this is sample of query
select * from s.vechile_information where datetimelong >= '1493215758000' and vechile_customerid = '123' and vechileId = '32' allow filetring;
but when remove >
it works fine
select * from s.vechile_information where datetimelong = '1493215758000' and vechile_customerid = '123' and vechileId = '32' allow filetring;
this is the table structure
CREATE TABLE fcs.vehicle_information (
vehicle_customerId text,
vehicleid text,
cityid text,
cityname text,
citynamear text,
createdby text,
dateTimeLong text,
description text,
driverid text,
drivername text,
drivernamear text,
groupofvehicles text,
groupofvehiclesystemid text,
insexpirygregoriandate bigint,
name text,
namear text,
platenumber text,
vehiclestatus text,
PRIMARY KEY (vehicle_customerId, vehicleid)
) ;
CREATE CUSTOM INDEX dateTimeLongvehicle_information ON fcs.vehicle_information (dateTimeLong) USING 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'analyzer_class' : 'org.apache.cassandra.index.sasi.analyzer.NonTokenizingAnalyzer', 'case_sensitive' : 'false'};
after trail one more scenario the issue still exist , i would like to know why this behavior .
this the new table structure
CREATE TABLE fcs.devicetracking_log (
customerid text,
vehiclesystemid text,
datetime text,
uniqueid text,
logaction int,
logid uuid,
cid int,
altitude double,
angle double,
assignmentname text,
assignmentsystemid text,
cityid text,
cityname text,
citynamear text,
coloronmap text,
departmentid text,
departmentname text,
departmentnamear text,
departmentsystemid text,
device text,
direction double,
drivername text,
drivernamear text,
driversystemid text,
groupofvehicles text,
groupofvehiclesystemid text,
gsm_signal bigint,
id text,
lastcid int,
lastidledate bigint,
lastoverspeednotificationtime bigint,
laststoppeddate bigint,
latitude double,
longitude double,
message_id bigint,
mileage double,
overspeedallowedperiod int,
overspeedmaximumspeed int,
receivingdate bigint,
regionid text,
regionname text,
regionnamear text,
report text,
rtc_datetime bigint,
rtctime bigint,
satellites int,
speed double,
uid text,
valid text,
vehiclename text,
vehiclenamear text,
vehicleplatenumber text,
PRIMARY KEY (customerid, vehiclesystemid, datetime, uniqueid, logaction, logid, cid)
) ;
CREATE CUSTOM INDEX ciddevicetrackinglog ON fcs.devicetracking_log (cid) USING 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'analyzer_class' : 'org.apache.cassandra.index.sasi.analyzer.NonTokenizingAnalyzer', 'case_sensitive' : 'false'};
CREATE CUSTOM INDEX citydevicetracking_log ON fcs.devicetracking_log (cityid) USING 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'analyzer_class' : 'org.apache.cassandra.index.sasi.analyzer.NonTokenizingAnalyzer', 'case_sensitive' : 'false'};
CREATE CUSTOM INDEX datetimedevicetrackinglog ON fcs.devicetracking_log (datetime) USING 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'analyzer_class' : 'org.apache.cassandra.index.sasi.analyzer.NonTokenizingAnalyzer', 'case_sensitive' : 'false'};
CREATE CUSTOM INDEX departmentdevicetracking_log ON fcs.devicetracking_log (departmentid) USING 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'analyzer_class' : 'org.apache.cassandra.index.sasi.analyzer.NonTokenizingAnalyzer', 'case_sensitive' : 'false'};
CREATE CUSTOM INDEX regiondevicetracking_log ON fcs.devicetracking_log (regionid) USING 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'analyzer_class' : 'org.apache.cassandra.index.sasi.analyzer.NonTokenizingAnalyzer', 'case_sensitive' : 'false'};
CREATE CUSTOM INDEX speeddevicetracking_log ON fcs.devicetracking_log (speed) USING 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'analyzer_class' : 'org.apache.cassandra.index.sasi.analyzer.NonTokenizingAnalyzer', 'case_sensitive' : 'false'};
CREATE CUSTOM INDEX vehiclenameardevicetracking_log ON fcs.devicetracking_log (vehiclenamear) USING 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'analyzer_class' : 'org.apache.cassandra.index.sasi.analyzer.NonTokenizingAnalyzer', 'case_sensitive' : 'false'};
CREATE CUSTOM INDEX vehiclenamedevicetrackinglog ON fcs.devicetracking_log (vehiclename) USING 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'analyzer_class' : 'org.apache.cassandra.index.sasi.analyzer.NonTokenizingAnalyzer', 'case_sensitive' : 'false'};
CREATE CUSTOM INDEX vehiclesystemiddevicetrackinglog ON fcs.devicetracking_log (vehiclesystemid) USING 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'analyzer_class' : 'org.apache.cassandra.index.sasi.analyzer.NonTokenizingAnalyzer', 'case_sensitive' : 'false'};
the select statement as following .
select * from fcs.devicetracking_log where customerId='179_gov' and regionid='0000015b648d225c-0242ac11000e0001' and dateTime>='1493208398000' allow filtering;
but in case of using =
it works
and also when adding one more condition or removing regionid it will work fine
and vehiclesystemid='0000015b64937c79-0242ac1100090001'
can any one help me ? it's a production issue