Skip to content

Commit aa5ac10

Browse files
committed
use doc fetcher instead in two tests
1 parent dfe7783 commit aa5ac10

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

solr/core/src/test/org/apache/solr/BasicFunctionalityTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ public void testNotLazyField() throws IOException {
763763
core.execute(core.getRequestHandler(req.getParams().get(CommonParams.QT)), req, rsp);
764764

765765
DocList dl = ((ResultContext) rsp.getResponse()).getDocList();
766-
Document d = req.getSearcher().storedFields().document(dl.iterator().nextDoc());
766+
Document d = req.getSearcher().getDocFetcher().doc(dl.iterator().nextDoc());
767767
// ensure field in fl is not lazy
768768
assertNotEquals("LazyField", ((Field) d.getField("test_hlt")).getClass().getSimpleName());
769769
assertNotEquals("LazyField", ((Field) d.getField("title")).getClass().getSimpleName());
@@ -791,7 +791,7 @@ public void testLazyField() throws IOException {
791791

792792
DocList dl = ((ResultContext) rsp.getResponse()).getDocList();
793793
DocIterator di = dl.iterator();
794-
Document d1 = req.getSearcher().storedFields().document(di.nextDoc());
794+
Document d1 = req.getSearcher().getDocFetcher().doc(di.nextDoc());
795795
IndexableField[] values1 = null;
796796

797797
// ensure fl field is non lazy, and non-fl field is lazy
@@ -813,7 +813,7 @@ public void testLazyField() throws IOException {
813813

814814
dl = ((ResultContext) rsp.getResponse()).getDocList();
815815
di = dl.iterator();
816-
Document d2 = req.getSearcher().storedFields().document(di.nextDoc());
816+
Document d2 = req.getSearcher().getDocFetcher().doc(di.nextDoc());
817817
// ensure same doc, same lazy field now
818818
assertSame("Doc was not cached", d1, d2);
819819
IndexableField[] values2 = d2.getFields("test_hlt");

solr/core/src/test/org/apache/solr/search/LargeFieldTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public void test() throws Exception {
9696
assertQ(req("q", "101", "df", ID_FLD, "fl", ID_FLD)); // eager load ID_FLD; rest are lazy
9797

9898
// fetch the document; we know it will be from the documentCache, docId 0
99-
final Document d = h.getCore().withSearcher(searcher -> searcher.storedFields().document(0));
99+
final Document d = h.getCore().withSearcher(searcher -> searcher.getDocFetcher().doc(0));
100100

101101
assertEager(d, ID_FLD);
102102
assertLazyNotLoaded(d, LAZY_FIELD);

0 commit comments

Comments
 (0)