What is the best way to get a float field value from docID?
I tried the following code but when it runs throws an exception For input
string: "`??eI" at line float lat = Float.parseFloat(tlat);
schemal.xml:
...
...
component.java:
@Override
public void process(ResponseBuilder rb) throws IOException {
DocSet docs = rb.getResults().docSet;
SolrIndexSearcher searcher = req.getSearcher()
FieldCache.StringIndex slat =
FieldCache.DEFAULT.getStringIndex(searcher.getReader(), "latitude");
DocIterator iter = docs.iterator(); while (iter.hasNext()) {
int docID = iter.nextDoc(); String tlat = slat.lookup[slat.order[docID]];
if (tlat != null) {
float lat = Float.parseFloat(tlat); //Exception!
}
}
}
Thanks,
Pablo