question

brent.hale_101199 avatar image
brent.hale_101199 asked Erick Ramirez commented

How to do Solr "Result Grouping" via CQL

Our customer needs the functionality of the Solr's "Result Grouping" feature that is documented here: https://lucene.apache.org/solr/guide/6_6/result-grouping.html#result-grouping.

Yes. that is for Solr 6.6, but I can find the same functionality in the pdf docs for 6.0 (which DSE Search is locked at): http://archive.apache.org/dist/lucene/solr/ref-guide/apache-solr-ref-guide-6.0.pdf

Is there a way to do "Result Grouping" via CQL?

I don't see that it is as an "Unsupported features for DSE Search" (https://docs.datastax.com/en/dse/5.1/dse-admin/datastax_enterprise/search/unsupportedSearchFeatures.html)


It may be tempting to use the "Collapse and Expand" functionality of Solr since at least the "Collapse" feature can be specified on the "fq" parameter. But that feature doesn't return the number of collapsed documents which our customer really needs. Nor does it look like DSE has a way of specifying the "expand" parameter. (https://docs.datastax.com/en/dse/5.1/dse-admin/datastax_enterprise/search/siQuerySyntax.html#siQuerySyntax)


searchcql
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

maedhroz avatar image
maedhroz answered Erick Ramirez commented

Grouping and field collapsing are supported only via the Solr HTTP interface.

2 comments Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

brent.hale_101199 avatar image brent.hale_101199 commented ·

Thanks. I'm grasping for solutions other than using the Solr HTTP interface for all the reasons mentioned in your docs. Do you think it would it be possible to use the custom payload feature mentioned in CASSANDRA-8553 to do this?

0 Likes 0 ·
Erick Ramirez avatar image Erick Ramirez ♦♦ commented ·

EDITED from @brent.hale_101199:

I've never written a custom query handler. Does doing so provide access to Solr directly when returning the total Result count (this and this)? Will that work?

0 Likes 0 ·