I'm using cqpserver with perl CQI interface for the queries from web. Query results are pretty big (a few million matches), but I use paging, so about 100 matches need to be kwic'ed to the result page at a time.
The problem is, I need to know the exact distinct size of some textual attributes of the query result (e.g., the number of documents found). And retrieving a full subcorpus dump, then attribute ids for it to get distinct count at the Perl script side needs a huge amount of data to be send via socket and is deadly slow. In fact, row count of 'group <Query> match <attribute>' is the value I need.
I wonder if CQi allows this kind of query executed fully at the cqpserver's side out of the box?