On 8/8/07, Seema Khandkar <[EMAIL PROTECTED]> wrote: > Hi solr-users, > > If I have a float field (sfloat) stored and indexed in a solr index, how > can I retrieve it within a plugin?=20 > > Example: > Document doc =3D solrIndexSearcher.doc(id);=20 String price =3D > doc.get("price");=20 > > The "price" string contains garbage value.
Try FieldType.toExternal() or toObject() > Ideally I would like to restrict the fields I get back but that does not > work either. I get back all fields for that document. > Document doc =3D solrIndexSearcher.doc(id, fields); // gives back all > fields I haven't tried that myself... I like sticking to the external HTTP APIs for applications whenever possible. -Yonik