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: ... <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/> ... <field name="latitude" type="float" indexed="true" stored="true" multiValued="false" /> 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