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. */
|
/** Adds field info for a Document. */
|
||||||
public void add(Document doc) {
|
public void add(Document doc) {
|
||||||
Enumeration fields = doc.fields();
|
List fields = doc.getFields();
|
||||||
while (fields.hasMoreElements()) {
|
Iterator fieldIterator = fields.iterator();
|
||||||
Fieldable field = (Fieldable) fields.nextElement();
|
while (fieldIterator.hasNext()) {
|
||||||
|
Fieldable field = (Fieldable) fieldIterator.next();
|
||||||
add(field.name(), field.isIndexed(), field.isTermVectorStored(), field.isStorePositionWithTermVector(),
|
add(field.name(), field.isIndexed(), field.isTermVectorStored(), field.isStorePositionWithTermVector(),
|
||||||
field.isStoreOffsetWithTermVector(), field.getOmitNorms());
|
field.isStoreOffsetWithTermVector(), field.getOmitNorms());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue