String fieldsList=e.getAttribute("fieldNames"); //a comma-delimited list of fields
String fields[]=defaultFieldNames;
if((fieldsList!=null)&&(fieldsList.trim().length()>0))
{
fields=fieldsList.trim().split(",");
//trim the fieldnames
for (int i = 0; i < fields.length; i++) {
fields[i]=fields[i].trim();
}
}
MoreLikeThisQuery mlt=new MoreLikeThisQuery(DOMUtils.getText(e),fields,analyzer);
mlt.setMaxQueryTerms(DOMUtils.getAttribute(e,"maxQueryTerms",defaultMaxQueryTerms));
mlt.setMinTermFrequency(DOMUtils.getAttribute(e,"minTermFrequency",defaultMinTermFrequency));
mlt.setPercentTermsToMatch(DOMUtils.getAttribute(e,"percentTermsToMatch",defaultPercentTermsToMatch)/100);
mlt.setBoost(DOMUtils.getAttribute(e,"boost",1.0f));
return mlt;