Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions solr/core/src/test/org/apache/solr/TestCrossCoreJoin.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,7 @@ void doTestJoin(String joinPrefix) throws Exception {
"/response=={'numFound':3,'start':0,'numFoundExact':true,'docs':[{'id':'1'},{'id':'4'},{'id':'5'}]}");

assertJQ(
req(
"qt",
reqWithPath(
"/export",
"q",
joinPrefix + " from=dept_id_s to=dept_s fromIndex=fromCore}cat:dev",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,37 +221,31 @@ public void testInterface() {

// test that qparser plugins work w/ the MoreLikeThisHandler
params.set(CommonParams.Q, "{!field f=id}44");
try (SolrQueryRequest mltreq = new SolrQueryRequestBase(core, params)) {
assertQ(null, "/mlt", mltreq, "//result/doc[1]/str[@name='id'][.='45']");
try (SolrQueryRequest mltreq = withPath("/mlt", new SolrQueryRequestBase(core, params))) {
assertQ(mltreq, "//result/doc[1]/str[@name='id'][.='45']");
}

// test that debugging works (test for MoreLikeThis*Handler*)
params.set(CommonParams.DEBUG_QUERY, "true");
try (SolrQueryRequest mltreq = new SolrQueryRequestBase(core, params)) {
try (SolrQueryRequest mltreq = withPath("/mlt", new SolrQueryRequestBase(core, params))) {
assertQ(
null,
"/mlt",
mltreq,
"//result/doc[1]/str[@name='id'][.='45']",
"//lst[@name='debug']/lst[@name='explain']");
}

params.set(FacetComponent.COMPONENT_NAME, "true");
params.set("facet.field", "name");
try (SolrQueryRequest mltreq = new SolrQueryRequestBase(core, params)) {
try (SolrQueryRequest mltreq = withPath("/mlt", new SolrQueryRequestBase(core, params))) {
assertQ(
null,
"/mlt",
mltreq,
"//result/doc[1]/str[@name='id'][.='45']",
"//lst[@name='facet_counts']/lst[@name='facet_fields']/lst[@name='name']/int[@name='George'][.='1']");
}
params.set("facet.field", "{!ex=tg}name");
params.set("fq", "{!tag=tg}name:George");
try (SolrQueryRequest mltreq = new SolrQueryRequestBase(core, params)) {
try (SolrQueryRequest mltreq = withPath("/mlt", new SolrQueryRequestBase(core, params))) {
assertQ(
null,
"/mlt",
mltreq,
"//result/doc[1]/str[@name='id'][.='45']",
"//lst[@name='facet_counts']/lst[@name='facet_fields']/lst[@name='name']/int[@name='George'][.='1']");
Expand Down Expand Up @@ -279,12 +273,11 @@ public void testMultifieldSimilarity() {

try (SolrQueryRequestBase req = new SolrQueryRequestBase(core, params) {}) {
req.setContentStreams(List.of(new ContentStreamBase.StringStream("bbb", "zzz")));
req.getContext().put(CommonParams.PATH, "/mlt");

// Make sure we have terms from both fields in the interestingTerms array and all documents
// have been retrieved as matching.
assertQ(
null,
"/mlt",
req,
"//lst[@name = 'interestingTerms']/float[@name = 'subword:bbb']",
"//lst[@name = 'interestingTerms']/float[@name = 'name:bbb']",
Expand Down
Loading
Loading