Question

I need to find similar documents to a document and also group the result based on a field say category.

I could find the MLT handler and I could find the grouping feature.

But I couldn't find a way to apply the grouping on the response given by MLT handler. Is there any way I can achieve this ?

Just adding grouping variables to the MLT handler didn't help

http://$HOST:8983/solr/collection1/mlt?q=id:SP2514N&wt=json&indent=true&mlt.fl=name&mlt.mintf=1&mlt.mindf=0&group=true&group.field=manu_id_s
Was it helpful?

Solution

I don't believe you can do this directly, you will have to create a plugin based on MLT query and MLT handler.

OTHER TIPS

I was able to achieve the desired result using CollapsingQParserPlugin

http://$HOST:8983/solr/collection1/mlt?q=id:SP2514N&wt=json&indent=true&mlt.fl=name&mlt.mintf=1&mlt.mindf=0&fq={!collapse field=manu_id_s}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top