Skip to content

Conversation

@epugh
Copy link
Contributor

@epugh epugh commented Dec 15, 2025

https://issues.apache.org/jira/browse/SOLR-18030

Is there a good reason why the MLT request handler isn't enabled by default? It's something we call out in the docs.

Also, I can't get the `{!mlt_content}lorem ipsum} to work. I tried

http://localhost:8983/solr/gettingstarted/mlt?mlt.fl=author&mlt.interestingTerms=details&mlt.match.include=true&mlt.mindf=0&mlt.mintf=0&q={!mlt_content q='george'}

and had no luck.

@epugh epugh requested a review from mkhludnev December 15, 2025 22:20
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Dec 15, 2025
@mkhludnev
Copy link
Member

Hi Eric!
My feeling was that MLT handler is a little bit of legacy and probably limited and superseded by MLT query parser.
In the former request they are used both handler and parser. I'd rather thy to send MLT query via parser into the regular handler.

@mkhludnev
Copy link
Member

btw, how much the distributed support one can evidence here https://github.com/apache/solr/blob/main/solr/core/src/java/org/apache/solr/handler/MoreLikeThisHandler.java? It's interesting if it can be used for subordinate searches via shards.qt or so one.

@epugh
Copy link
Contributor Author

epugh commented Dec 16, 2025

I tested http://localhost:8983/solr/gettingstarted/select?q={!mlt qf=author mintf=1 mindf=1}0553573403 and it worked...

However, I tried making mlt.interestingTerms=list work with the !mlt and no joy. I also can't get the !mlt_content to work. Could you provide some more examples of queries? I'd be happy to add them to the docs.. I'm just somewhat struggling to understand what works, and potentially, are things I am bumping into actual bugs, or just me not using the tools properly!

@mkhludnev
Copy link
Member

Did you pass qf via local param at {!mlt_content} ?
Note the ticket is https://issues.apache.org/jira/browse/SOLR-16420
Example queries are https://github.com/apache/solr/blob/main/solr/core/src/test/org/apache/solr/search/mlt/CloudMLTQContentParserTest.java
I briefly looked at the code with regards to mlt.interestingTerms I don't think qparsers deals somehow with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants