diff --git a/src/test/java/com/meilisearch/integration/SearchTest.java b/src/test/java/com/meilisearch/integration/SearchTest.java index 8c5a93d7..9fb08872 100644 --- a/src/test/java/com/meilisearch/integration/SearchTest.java +++ b/src/test/java/com/meilisearch/integration/SearchTest.java @@ -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 (and the Fantabulous Emancipation of One Harley Quinn)"))); @@ -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)"))); @@ -526,15 +526,11 @@ 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("671"))); assertThat( - resGson.hits[0].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(), + resGson.hits[2].getTitle(), is(equalTo("Harry Potter and the Philosopher's Stone"))); } @@ -561,16 +557,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 */