: Hits hits = searcher.search(query);
: for(int i=0; i<nodes; i++) {
: id[i]=hits.doc(i).get("ID");
: score[i]=hits.score(i);
Please note that because of your use of the Hits class, you are not
getting any of the benefits of Solr: no DocSet, DocList, or Document
caching. depending on the value of the "nodes" variable, you may even be
reexecuting the query multiple times (and non of those attempts will be
cached)
you would probably be *much* happier if you used the a method returning a
DocSet to get the docIds and score ... you might even find that the
FieldSelector methods are faster for getting the "ID" field then using hte
FieldCache (but maybe not)
-Hoss