[
https://issues.apache.org/jira/browse/SOLR-5125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13742721#comment-13742721
]
Hoss Man commented on SOLR-5125:
--------------------------------
EarlyTerminatingCollector, and EarlyTerminationCollectorException are new in
4.4 -- they are triggered if the flags passed to getDocListNC match the mask
specified by the constant TERMINATE_EARLY (0x04). The only code using that
flag is in he SpellChecker.
Digging through the stack trace [~elyograg] posted however, shows that the
MLTComponent is passing the value of the "mlt.count" param as if it were a
flags bitset...
{noformat}
// MoreLikeThisComponent.process(MoreLikeThisComponent.java:78)
int mltcount = params.getInt(MoreLikeThisParams.DOC_COUNT, 5);
// MoreLikeThisComponent.process(MoreLikeThisComponent.java:107)
NamedList<DocList> sim = getMoreLikeThese(rb, rb.req.getSearcher(),
rb.getResults().docList, mltcount);
// MoreLikeThisComponent.getMoreLikeThese(MoreLikeThisComponent.java:339)
NamedList<DocList> getMoreLikeThese(ResponseBuilder rb,
SolrIndexSearcher searcher, DocList docs, int flags) throws IOException {
// MoreLikeThisComponent.getMoreLikeThese(MoreLikeThisComponent.java:356)
DocListAndSet sim = mltHelper.getMoreLikeThis(id, 0, rows, null, null, flags);
// MoreLikeThisHelper.getMoreLikeThis(MoreLikeThisHandler.java:345)
public DocListAndSet getMoreLikeThis( int id, int start, int rows, List<Query>
filters, List<InterestingTerm> terms, int flags ) throws IOException
// MoreLikeThisHelper.getMoreLikeThis(MoreLikeThisHandler.java:365)
results.docList = searcher.getDocList(realMLTQuery, filters, null, start, rows,
flags);
{noformat}
...so a value like 100 matches the mask, but a value like 99 won't.
The question is: what flags *should* be getting passed into these methods, and
is mltCount getting used correctly wherever it should be getting used in
addition to this totally bogus "flags" usage?
> Distributed MoreLikeThis fails with NullPointerException, shard query gives
> EarlyTerminatingCollectorException
> --------------------------------------------------------------------------------------------------------------
>
> Key: SOLR-5125
> URL: https://issues.apache.org/jira/browse/SOLR-5125
> Project: Solr
> Issue Type: Bug
> Components: MoreLikeThis
> Affects Versions: 4.4
> Reporter: Shawn Heisey
> Fix For: 4.5, 5.0
>
>
> A distributed MoreLikeThis query that works perfectly on 4.2.1 is failing on
> 4.4.0. The original query returns a NullPointerException. The Solr log
> shows that the shard queries are throwing EarlyTerminatingCollectorException.
> Full details to follow in the comments.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]