mirror of https://github.com/apache/lucene.git
remove dead code: Document.getFields(String) cannot return null
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1176389 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fe3982c746
commit
dc4450207f
|
@ -707,12 +707,10 @@ public final class MoreLikeThis {
|
|||
if (vector == null) {
|
||||
Document d = ir.document(docNum);
|
||||
IndexableField fields[] = d.getFields(fieldName);
|
||||
if (fields != null) {
|
||||
for (int j = 0; j < fields.length; j++) {
|
||||
final String stringValue = fields[j].stringValue();
|
||||
if (stringValue != null) {
|
||||
addTermFrequencies(new StringReader(stringValue), termFreqMap, fieldName);
|
||||
}
|
||||
for (int j = 0; j < fields.length; j++) {
|
||||
final String stringValue = fields[j].stringValue();
|
||||
if (stringValue != null) {
|
||||
addTermFrequencies(new StringReader(stringValue), termFreqMap, fieldName);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue