-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
The createIndex command accepts a payload such as:
{"createIndex":{"name":"idx3","definition":{"column":{"lt":"$keys"}},"options":{}}}
where lt is a LIST<TEXT> (presumably the same for sets).
The resulting index is of course on the values, as CQL shows:
CREATE CUSTOM INDEX idx3 ON default_keyspace.t (values(lt)) USING 'StorageAttachedIndex';
i.e. the same effect as the expected API payload with {"lt":"$values"}.
Incidentally:
the fact that the API accepts a payload with indexing function for lists and sets at all is not stated on the error message that gives guidance:
Command has an invalid format for index creation column.
The column string can have different formats:
- Primitive column: {"column": "primitiveColumn"}
- List column: {"column": "listColumn"}
- Set column: {"column": "setColumn"}
- Map column:
- Default to index on map entries: {"column": "mapColumn"}
- Index on map keys: {"column": {"mapColumn" : "$keys"}}
- Index on map values: {"column": {"mapColumn" : "$values"}}
Resend the command using a valid format for index creation column.
I guess this is OK, just wanted to make this point explicit. The (likely) bug is the one above, with $keys being treated as $values.
Metadata
Metadata
Assignees
Labels
No labels