Skip to content

Commit

Permalink
grab some changes from PR 3053
Browse files Browse the repository at this point in the history
  • Loading branch information
cpoerschke committed Jan 31, 2025
1 parent ac99f53 commit 024d70d
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 150 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import org.apache.solr.response.SolrQueryResponse;
import org.apache.solr.search.DocIterator;
import org.apache.solr.search.DocList;
import org.apache.solr.search.SolrDocumentFetcher;
import org.apache.solr.search.SolrIndexSearcher;
import org.junit.Rule;
import org.junit.rules.TestWatcher;
Expand Down Expand Up @@ -139,11 +140,12 @@ protected TestTag[] pullTagsFromResponse(SolrQueryRequest req, SolrQueryResponse
NamedList<?> rspValues = rsp.getValues();
Map<String, String> matchingNames = new HashMap<>();
SolrIndexSearcher searcher = req.getSearcher();
SolrDocumentFetcher docFetcher = searcher.getDocFetcher();
DocList docList = (DocList) rspValues.get("response");
DocIterator iter = docList.iterator();
while (iter.hasNext()) {
int docId = iter.next();
Document doc = searcher.storedFields().document(docId);
Document doc = docFetcher.doc(docId);
String id = doc.getField("id").stringValue();
String name = lookupByName(doc.get("name"));
assertEquals("looking for " + name, NAMES.indexOf(name) + "", id);
Expand Down
Loading

0 comments on commit 024d70d

Please # to comment.