stratio-cassandra icon indicating copy to clipboard operation
stratio-cassandra copied to clipboard

how i can find count of 'lucene index' ?

Open leesangboo opened this issue 9 years ago • 2 comments

how i can find count of 'lucene index' ?

leesangboo avatar May 24 '15 05:05 leesangboo

What do you mean by count? If you mean count queries, they can be done in the same way as it is done in regular CQL queries:

SELECT COUNT(*) FROM tweets WHERE lucene='{
    query : {type:"phrase", field:"body", values:["big","data","gives","organizations"]}
}';

If you want to get the total number of documents in the index, this can not currently be done with Stratio Cassandra. This feature will be available through JMX in the incoming pluggable version of Stratio Cassandra (see CASSANDRA-8717), as soon as Apache Cassandra 2.1.6 is released.

adelapena avatar May 25 '15 11:05 adelapena

This seems to be a very expensive operation though, as it loads all matching rows from the underlying store. Is there a way to this more cheaply?

edit: I know this is a limitation of the underlying C* model (where it needs to pull everything back to the co-ordinator node), but there seems to be an opportunity here to at least estimate a number?

philmes avatar Aug 03 '15 18:08 philmes