Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes related to the next Meilisearch release (v1.9.0) #747

Merged
merged 2 commits into from
Jul 1, 2024
Merged
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
26 changes: 10 additions & 16 deletions src/test/java/com/meilisearch/integration/SearchTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ public void testSearchHighlight() throws Exception {

assertThat(resGson.hits, is(arrayWithSize(20)));
assertThat(
resGson.hits[0].getFormatted().getTitle(),
resGson.hits[3].getFormatted().getTitle(),
is(
equalTo(
"Birds of Prey (<em>and</em> the Fantabulous Emancipation of One Harley Quinn)")));
Expand Down Expand Up @@ -296,7 +296,7 @@ public void testSearchWithCustomizedHighlight() throws Exception {

assertThat(resGson.hits, is(arrayWithSize(20)));
assertThat(
resGson.hits[0].getFormatted().getTitle(),
resGson.hits[3].getFormatted().getTitle(),
is(
equalTo(
"Birds of Prey ((⊃。•́‿•̀。)⊃ and ⊂(´• ω •`⊂) the Fantabulous Emancipation of One Harley Quinn)")));
Expand Down Expand Up @@ -526,16 +526,14 @@ public void testRawSearchSort() throws Exception {
Results resGson = jsonGson.decode(index.rawSearch(searchRequest), Results.class);

assertThat(resGson.hits, is(arrayWithSize(20)));
assertThat(resGson.hits[0].getId(), is(equalTo("495764")));
assertThat(resGson.hits[0].getId(), is(equalTo("38700")));
assertThat(resGson.hits[0].getTitle(), is(equalTo("Bad Boys for Life")));
assertThat(resGson.hits[2].getId(), is(equalTo("495764")));
assertThat(
resGson.hits[0].getTitle(),
resGson.hits[2].getTitle(),
is(
equalTo(
"Birds of Prey (and the Fantabulous Emancipation of One Harley Quinn)")));
assertThat(resGson.hits[1].getId(), is(equalTo("671")));
assertThat(
resGson.hits[1].getTitle(),
is(equalTo("Harry Potter and the Philosopher's Stone")));
}

/** Test search sort */
Expand All @@ -561,16 +559,12 @@ public void testRawSearchSortWithIntParameter() throws Exception {
Results resGson = jsonGson.decode(index.rawSearch(searchRequest), Results.class);

assertThat(resGson.hits, is(arrayWithSize(20)));
assertThat(resGson.hits[0].getId(), is(equalTo("671")));
assertThat(
resGson.hits[0].getTitle(),
is(equalTo("Harry Potter and the Philosopher's Stone")));
assertThat(resGson.hits[1].getId(), is(equalTo("495764")));
assertThat(resGson.hits[0].getId(), is(equalTo("38700")));
assertThat(resGson.hits[0].getTitle(), is(equalTo("Bad Boys for Life")));
assertThat(resGson.hits[1].getId(), is(equalTo("671")));
assertThat(
resGson.hits[1].getTitle(),
is(
equalTo(
"Birds of Prey (and the Fantabulous Emancipation of One Harley Quinn)")));
is(equalTo("Harry Potter and the Philosopher's Stone")));
}

/** Test search sort */
Expand Down
Loading