Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order by does not work #40

Open
grom358 opened this issue Jan 8, 2025 · 0 comments
Open

Order by does not work #40

grom358 opened this issue Jan 8, 2025 · 0 comments

Comments

@grom358
Copy link

grom358 commented Jan 8, 2025

CREATE TABLE test.test(id int, sent_at timestamp, tags text, primary key(id, sent_at));
CREATE CUSTOM INDEX test_tags ON test.test () USING 'com.stratio.cassandra.lucene.Index' WITH OPTIONS = {'refresh_seconds': '1', 'schema': '{fields: {tags: {type: "string" }}}'};
INSERT INTO test.test(id, sent_at, tags) VALUES (1, '2025-01-07 15:10:50.506000+0000', 'test');
INSERT INTO test.test(id, sent_at, tags) VALUES (1, '2025-01-07 15:10:50.507000+0000', 'test');
INSERT INTO test.test(id, sent_at, tags) VALUES (1, '2025-01-07 15:10:51.665000+0000', 'test');
INSERT INTO test.test(id, sent_at, tags) VALUES (1, '2025-01-07 15:10:51.666000+0000', 'test');
INSERT INTO test.test(id, sent_at, tags) VALUES (1, '2025-01-07 15:11:34.390000+0000', 'test');
INSERT INTO test.test(id, sent_at, tags) VALUES (1, '2025-01-08 15:11:34.390000+0000', 'test');
SELECT sent_at FROM test.test WHERE id = 1 AND expr(test_tags, '{filter: {type: "wildcard", field: "tags", value: "*"}}') AND sent_at >= 1736262639000 ORDER BY sent_at DESC LIMIT 5;

Expected results:

2025-01-08 15:11:34.390000+0000
2025-01-07 15:11:34.390000+0000
2025-01-07 15:10:51.666000+0000
2025-01-07 15:10:51.665000+0000
2025-01-07 15:10:50.507000+0000

Actual results:

2025-01-07 15:10:50.506000+0000
2025-01-07 15:10:50.507000+0000
2025-01-07 15:10:51.665000+0000
2025-01-07 15:10:51.666000+0000
2025-01-07 15:11:34.390000+0000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant