0
를 사용하여 쿼리 범위 날짜가
나는이 스키마를 사용하여 쿼리 범위의 일을하는 것을 시도했다 :카산드라
create column family fact_ingreso with comparator = UTF8Type and
key_validation_class=UTF8Type and
column_metadata =
[{column_name: ing_fecing, validation_class: DateType,index_type:KEYS}];
을하고 나는이 길에 데이터를 삽입
// Date format: "2010-04-01 00:00:00"
// The datos[20] has a date as a String in the above format
SimpleDateFormat formatoFecha = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date fecha = formatoFecha.parse(datos[20]);
System.out.println(fecha);
Column ing_fecing = new Column(toByteBuffer("ing_fecing"));
ing_fecing.setValue(ByteBufferUtil.bytes(fecha.getTime()));
ing_fecing.setTimestamp(timestamp);
client.insert(toByteBuffer(id_row), parent, ing_fecing, ConsistencyLevel.ONE);
지금까지 너무 잘하지만, 나는 다음과 코드를 사용하여 쿼리 범위 일을하려고하면
get fact_ingreso where ing_fecing>2011-01-12;
을 나는 인덱스 절 위스콘신에 "아니 인덱스 컬럼 존재하는 오류가 발생했습니다 일 운영자 EQ "
내가 연산자를 대체한다면" "를"> = "이 작동 :
get fact_ingreso where ing_fecing=2011-01-12;
출력
RowKey: 645
=> (column=ing_fecing, value=2011-01-12 00:00:00-0300, timestamp=1361899176638)
나는 카산드라 데이터베이스에 안돼서 내가 정말 필요 내 논문 작업을 위해이 기능을 배포하십시오. 누구든지 나를 도울 수 있다면 정말 고마워.
편집 : 카산드라 버전은 적어도 하나 개의 값이 절을 동일 사용하여 지정된이 있어야 1.2 감사 카산드라와