idok-commit AT lists.psi.ch
Subject: Commit emails of the iDok project
List archive
[idok-commit] idok commit r41 - trunk/java/ch/idok/service/server/search/lucene
Chronological Thread
- From: "AFS account Stadler Hans Christian" <stadler_h AT savannah.psi.ch>
- To: idok-commit AT lists.psi.ch
- Subject: [idok-commit] idok commit r41 - trunk/java/ch/idok/service/server/search/lucene
- Date: Thu, 13 Mar 2008 10:31:41 +0100
- List-archive: <https://lists.web.psi.ch/pipermail/idok-commit/>
- List-id: Commit emails of the iDok project <idok-commit.lists.psi.ch>
Author: stadler_h
Date: Thu Mar 13 10:31:41 2008
New Revision: 41
Log:
Replacing deprecated Lucene document.fields() method
Modified:
trunk/java/ch/idok/service/server/search/lucene/LuceneSearchService.java
Modified:
trunk/java/ch/idok/service/server/search/lucene/LuceneSearchService.java
==============================================================================
--- trunk/java/ch/idok/service/server/search/lucene/LuceneSearchService.java
(original)
+++ trunk/java/ch/idok/service/server/search/lucene/LuceneSearchService.java
Thu Mar 13 10:31:41 2008
@@ -23,10 +23,10 @@
import java.io.IOException;
import java.io.StringReader;
import java.util.Collection;
-import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
+import java.util.ListIterator;
import java.util.Map;
import java.util.logging.Logger;
@@ -208,10 +208,10 @@
public MatchingDoc(HitIterator.RepoSearch rs, Document doc) {
repoSearch = rs;
document = doc;
- Enumeration<?> fields = doc.fields();
+ ListIterator<?> fields = doc.getFields().listIterator();
HashSet<String> qfields = repoSearch.iter.fields;
- while (fields.hasMoreElements()) {
- Field field = (Field) fields.nextElement();
+ while (fields.hasNext()) {
+ Field field = (Field) fields.next();
if (!field.name().equals("content")) {
if (qfields.size() == 0) {
addMeta(field);
@@ -512,9 +512,6 @@
}
/**
- *
- */
- /**
* @brief Relinquish any state associated with this iterator.
*
* This method must be called externally exactly once for each
iterator.
- [idok-commit] idok commit r41 - trunk/java/ch/idok/service/server/search/lucene, AFS account Stadler Hans Christian, 03/13/2008
Archive powered by MHonArc 2.6.19.