stratio-cassandra
stratio-cassandra copied to clipboard
how i can find count of 'lucene index' ?
how i can find count of 'lucene index' ?
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.
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?