I'm using solr's more like this to analyze the most similar documents. But while I specify mlt.count
argument and if it is not 15, the score don't show. The more like this arguments is mlt=true&mlt.fl=text&mlt.count=12
, while text
is the filed that has term vector. And the fl
argument is *,score
. I queried this url:
http://localhost:8983/solr/collection1/select?q=id%3A1967956383&wt=json&indent=true&mlt=true&mlt.fl=text&mlt.count=12
.
When I specify mlt.count=15
, the score shows up. And after that, I query mlt.count=12
again, it shows up, too.
My solr version is 4.0.
Does anybody have any idea? Thanks!
This has been documented as a SOLR bug SOLR-5042, and a patch posted against solr version 4.3. I've relocated that patch back to 4.2.1 and seen that it fixes this behavior there.
If you query the /mlt handler directly, instead of using the mlt component under the /select handler, you can work around this issue, as the handler accepts its count as rows=12 instead of mlt.count=12.