I ran into these bad comments in MoreLikeThisParams.java:

// Do you want to include the original document in the results or not
public final static String INTERESTING_TERMS = PREFIX + "interestingTerms";  // 
false,details,(list or true)

1. The leading comment is just plain wrong – it is a copy/paste error, a copy 
of the comment for the mlt.match.include parameter.

2. The trailing comment suggests that “true” is treated the same as “list”, 
which is not the case. The wiki says that the options are “list”, “details”, or 
“none”, which is consistent with the code:

public static TermStyle get( String p )
{
  if( p != null ) {
    p = p.toUpperCase(Locale.ROOT);
    if( p.equals( "DETAILS" ) ) {
      return DETAILS;
    }
    else if( p.equals( "LIST" ) ) {
      return LIST;
    }
  }
  return NONE; 
}

As an “Improvement”, I would suggest that the options be “list” (or “true”), 
“details”, or “none” (or “false”).

-- Jack Krupansky

Reply via email to