Skip to content

Commit

Permalink
SOLR-16420: fix QueryEqualityTest for {!mlt_content} (apache#1191)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkhludnev authored Nov 25, 2022
1 parent 1eef75e commit 9245cc2
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1295,13 +1295,24 @@ public void testQueryMLT() throws Exception {
}

public void testQueryMLTContent() throws Exception {
assertU(adoc("id", "1", "lowerfilt", "sample data"));
assertU(adoc("id", "1", "lowerfilt", "sample data", "upperfilt", "SAMPLE DATA"));
assertU(commit());
try {
assertQueryEquals(
"mlt",
"mlt_content",
"{!mlt_content qf=lowerfilt}sample data",
"{!mlt_content qf=lowerfilt v='sample data'}");
"{!mlt_content qf=lowerfilt v='sample data'}",
"{!qf=lowerfilt}sample data");
SolrQueryRequest req = req(new String[] {"df", "text"});
try {
QueryUtils.checkUnequal(
QParser.getParser("{!mlt_content qf=lowerfilt}sample data", req).getQuery(),
QParser.getParser("{!mlt_content qf=lowerfilt qf=upperfilt}sample data", req)
.getQuery());
} finally {
req.close();
}

} finally {
delQ("*:*");
assertU(commit());
Expand Down

0 comments on commit 9245cc2

Please sign in to comment.