Hi,
I found some difficulties converting from old API to the newest one :
import org.apache.lucene.index.TermDocs; // does not exist
import org.apache.lucene.index.TermEnum; // does not exist
I tried the migration doc, but could not figure it out, here my code :
private List<Short>[] loadFieldValues(IndexReader reader) throws IOException {
List<Short>[] retArray = new List[reader.maxDoc()];
TermEnum termEnum = reader.terms (new Term (GEO_LOC));
try {
do {
Term term = termEnum.term();
if (term==null || term.field() != GEO_LOC) break;
TermDocs td = reader.termDocs(term);
String value = term.text();
.......
...........
td.close();
} while (termEnum.next());
} finally {
termEnum.close();
}
return retArray;
}
I will appreciate your help.
thanks