mirror of https://github.com/apache/lucene.git
don't use deprecated method (thanks to Simon Willnauer)
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@431976 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3308763643
commit
7a90732466
|
@ -62,9 +62,10 @@ final class FieldInfos {
|
|||
|
||||
/** Adds field info for a Document. */
|
||||
public void add(Document doc) {
|
||||
Enumeration fields = doc.fields();
|
||||
while (fields.hasMoreElements()) {
|
||||
Fieldable field = (Fieldable) fields.nextElement();
|
||||
List fields = doc.getFields();
|
||||
Iterator fieldIterator = fields.iterator();
|
||||
while (fieldIterator.hasNext()) {
|
||||
Fieldable field = (Fieldable) fieldIterator.next();
|
||||
add(field.name(), field.isIndexed(), field.isTermVectorStored(), field.isStorePositionWithTermVector(),
|
||||
field.isStoreOffsetWithTermVector(), field.getOmitNorms());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue