I understand the error message, but I don't understand why I get it. 
Here's the CF:

cqlsh:avatars> describe columnfamily HBX_FILE;

CREATE COLUMNFAMILY HBX_FILE (
  KEY blob PRIMARY KEY,
  HBX_FIL_DATE text,
  HBX_FIL_LARGE ascii,
  HBX_FIL_MEDIUM ascii,
  HBX_FIL_SMALL ascii,
  HBX_FIL_STATUS text,
  HBX_FIL_TINY ascii
) WITH
  comment='' AND
  comparator=text AND
  read_repair_chance=1.000000 AND
  gc_grace_seconds=864000 AND
  default_validation=blob AND
  min_compaction_threshold=4 AND
  max_compaction_threshold=32 AND
  replicate_on_write=True;

CREATE INDEX HBX_FILE_HBX_FIL_STATUS_idx ON HBX_FILE (HBX_FIL_STATUS);

  The query and the error:

cqlsh:avatars> SELECT HBX_FIL_SMALL FROM HBX_FILE WHERE KEY=1 AND 
HBX_FIL_STATUS='actif';
Bad Request: No indexed columns present in by-columns clause with "equals" 
operator

  A query that works:

cqlsh:avatars> SELECT HBX_FIL_STATUS FROM HBX_FILE WHERE KEY=1;
 HBX_FIL_STATUS
----------------
          Actif

Just in case, here's cli's output for the same CF:

[default@avatars] describe HBX_FILE;
    ColumnFamily: HBX_FILE
      Key Validation Class: org.apache.cassandra.db.marshal.BytesType
      Default column value validator: org.apache.cassandra.db.marshal.BytesType
      Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type
      Row cache size / save period in seconds / keys to save : 0.0/0/all
      Row Cache Provider: 
org.apache.cassandra.cache.ConcurrentLinkedHashCacheProvider
      Key cache size / save period in seconds: 200000.0/14400
      GC grace seconds: 864000
      Compaction min/max thresholds: 4/32
      Read repair chance: 1.0
      Replicate on write: true
      Bloom Filter FP chance: default
      Built indexes: []
      Column Metadata:
        Column Name: HBX_FIL_DATE
          Validation Class: org.apache.cassandra.db.marshal.UTF8Type
        Column Name: HBX_FIL_LARGE
          Validation Class: org.apache.cassandra.db.marshal.AsciiType
        Column Name: HBX_FIL_MEDIUM
          Validation Class: org.apache.cassandra.db.marshal.AsciiType
        Column Name: HBX_FIL_SMALL
          Validation Class: org.apache.cassandra.db.marshal.AsciiType
        Column Name: HBX_FIL_STATUS
          Validation Class: org.apache.cassandra.db.marshal.UTF8Type
          Index Name: HBX_FILE_HBX_FIL_STATUS_idx
          Index Type: KEYS
        Column Name: HBX_FIL_TINY
          Validation Class: org.apache.cassandra.db.marshal.AsciiType
      Compaction Strategy: 
org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy

  And the same error, with other words, in the CLI:

[default@avatars] get HBX_FILE where HBX_FIL_STATUS = 'actif';
No indexed columns present in index clause with operator EQ

  Am I missing something? Might as well be that I'm too tired...

--
Marcos Dione
SysAdmin
Astek Sud-Est
pour FT/TGPF/OPF/PORTAIL/DOP/HEBEX @ Marco Polo
04 97 12 62 45 - mdione....@orange.com



_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations 
confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce 
message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages 
electroniques etant susceptibles d'alteration,
France Telecom - Orange decline toute responsabilite si ce message a ete 
altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged 
information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete 
this message and its attachments.
As emails may be altered, France Telecom - Orange is not liable for messages 
that have been modified, changed or falsified.
Thank you.

Reply via email to