What results do you get when you just try it in cloud mode? This is a _parser_, it’s just in charge of parsing the query and, in this case getting the relevant from the indicated document to add to the query while doing some sanity checking. The bits that distribute the query to shards and collate the results are elsewhere.
Best, Erick > On Jan 3, 2020, at 5:43 PM, Arnold Bronley <arnoldbron...@gmail.com> wrote: > > Hi, > > I have one custom Solr plugin that uses MoreLikeThis class. AFAIK, > MoreLikeThis handler does not support distributed mode and the issue is > still open for that - https://issues.apache.org/jira/browse/SOLR-5480. > > However, I saw that there is some possibility to use CloudMLTQParser to > work around above issue. CloudMLTQParser claims to work in distributed mode > too - https://issues.apache.org/jira/browse/SOLR-6248. When I took a look > at the code though, > https://github.com/apache/lucene-solr/blob/2d690885e554dda7b4b4e0f46f2bd9cacdb32df6/solr/core/src/java/org/apache/solr/search/mlt/CloudMLTQParser.java > , > it seems like that for the document for which we are finding out related > documents, that document is getting fetched now with real-time get request > handler. > core.getRequestHandler("/get").handleRequest(request, rsp); > This is good because now that document will get fetched from any shard > existing > in cloud wherever that document exists. > > However, the part where the relevant related documents are supposed to be > fetched it still uses the same old sort of code. > e.g. MoreLikeThis mlt = new MoreLikeThis(req.getSearcher(). > getIndexReader()); > > Isn't getSearcher bound to only the particular shard and AFAIK it does not > work across shards in cloud? > > So how then, CloudMLTQParser works in SolrCloud mode? Does it even work?