mkhludnev commented on code in PR #1260:
URL: https://github.com/apache/solr/pull/1260#discussion_r1111239181
##########
solr/core/src/java/org/apache/solr/handler/MoreLikeThisHandler.java:
##########
@@ -422,6 +417,24 @@ public DocListAndSet getMoreLikeThis(
return results;
}
+ public List<InterestingTerm> getInterestingTerms(int docid) throws
IOException {
+ final ArrayList<InterestingTerm> interestingTerms = new ArrayList<>();
+ getBoostedMLTQuery(docid, interestingTerms);
+ return interestingTerms;
+ }
+ /**
+ * Sets {@link #boostedMLTQuery} and return, also put interesting terms
into terms list if
+ * provided non-null. Sorry. It lacks of perfection and overall sense.
Review Comment:
Got it. This collection also let to bypass terms extraction. I'm not sure it
allows to save a lot of computation, I prefer to keep it lazy. I tries to toss
code a little to improve. The root cause of this ugliness is lack of proper
public method in Lucene. It's worth to decouple terms extraction, field
assignment and query factoring. It will let to boost clauses without boolean
query ripping.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]