문제

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
도움이 되었습니까?

해결책

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

다른 팁

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}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top