Stratio / cassandra-lucene-index

Lucene based secondary indexes for Cassandra
Apache License 2.0
600 stars 170 forks source link

Can't retrieve Many records and count(*) #402

Open dbapramod882 opened 6 years ago

dbapramod882 commented 6 years ago

Scenario: I have loaded a table with approximately 5 Million records and trying to fetch the records on a time stamp field. CREATE CUSTOM INDEX tx_id ON arrow.history2 (lucene) USING 'com.stratio.cassandra.lucene.Index' WITH OPTIONS = {'refresh_seconds': '10', 'ram_buffer_mb': '3072', 'directory_path': '/data02/cassandra/data/arrow/history2/lucene.idx', 'schema': '{fields: { sent_date: {type: "date", pattern: "yyyy-MM-dd HH:mm:ss Z"}}}'};

Retrieving records as, select tx_id,sent_date from arrow.history2 where lucene = '{filter:{type: "range", field: "sent_date", lower: "2018-08-22 18:47:09 +0000", upper: "2020-08-22 14:47:09 +0000", include_lower: true, include_upper: true},sort: {field: "sent_date", reverse: true}}';

Here the issue was, when I turn off the paging in cqlsh It was never returning any results and *count()** also not returning any thing. (I made sure that request time out is kept enough long, If I hit ctrl + c also the command was not exiting).

FYI: The same query when ran in DSE Search I am able to fetch the default 10 records even when the paging was off and count() returned the number of records. `SELECT count() from texas.dallas where solr_query='{"q":"sent_date:[2018-08-22T18:47:09Z TO 2020-08-22T14:47:09Z] ","sort":"sent_date DESC","start":0}';

count

520939 ` Please advise, Thanks