Skip to content

Commit

Permalink
Update test to use both fielded and unfielded queries
Browse files Browse the repository at this point in the history
  • Loading branch information
JCRPaquin committed Sep 27, 2023
1 parent f61806b commit 46792cb
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

/**
* Test for the date_string type
*
*/
public class TestAdsabsTypeDateString extends MontySolrQueryTestCase {

Expand Down Expand Up @@ -268,9 +267,15 @@ public void test() throws Exception {
*/

for (int i = 1900; i < 2025; i++) {
// Test unfielded year queries
assertQ(req("q", Integer.toString(i)),
"//*[@numFound='1']"
);

// Test fielded year queries
assertQ(req("q", "year:" + i),
"//*[@numFound='1']"
);
}

assertQ(req("q", "year:1900-1950"),
Expand Down

0 comments on commit 46792cb

Please sign in to comment.