mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-30 10:23:41 -04:00
[TEST] Profile flag needs to be set, ensure searches go against primary only for consistency
This commit is contained in:
parent
4d602d8ad1
commit
9b29d6823a
1 changed files with 4 additions and 4 deletions
|
@ -125,13 +125,15 @@ public class QueryProfilerIT extends ESIntegTestCase {
|
|||
.setProfile(false)
|
||||
.addSort("_score", SortOrder.DESC)
|
||||
.addSort("_uid", SortOrder.ASC)
|
||||
.setPreference("_primary")
|
||||
.setSearchType(SearchType.QUERY_THEN_FETCH);
|
||||
|
||||
SearchRequestBuilder profile = client().prepareSearch("test")
|
||||
.setQuery(q)
|
||||
.setProfile(false)
|
||||
.setProfile(true)
|
||||
.addSort("_score", SortOrder.DESC)
|
||||
.addSort("_uid", SortOrder.ASC)
|
||||
.setPreference("_primary")
|
||||
.setSearchType(SearchType.QUERY_THEN_FETCH);
|
||||
|
||||
MultiSearchResponse.Item[] responses = client().prepareMultiSearch()
|
||||
|
@ -161,8 +163,6 @@ public class QueryProfilerIT extends ESIntegTestCase {
|
|||
for (int j = 0; j < vanillaHits.length; j++) {
|
||||
assertThat("Profile hit #" + j + " has a different ID from Vanilla",
|
||||
vanillaHits[j].getId(), equalTo(profileHits[j].getId()));
|
||||
//assertTrue("Profile hit #" + j + "'s score [" + profileHits[j].getScore() + "] is not close to Vanilla [" + vanillaHits[j].getScore() + "]",
|
||||
// nearlyEqual(vanillaHits[j].getScore(), profileHits[j].getScore(), 0.001));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue