mirror of
https://github.com/valitydev/deanonimus.git
synced 2024-11-06 02:05:16 +00:00
Del TextQueryType.Phrase and test (#45)
This commit is contained in:
parent
94a5dce656
commit
b9ad205dfb
@ -1,7 +1,6 @@
|
||||
package dev.vality.deanonimus.db;
|
||||
|
||||
import dev.vality.deanonimus.domain.Party;
|
||||
import dev.vality.deanonimus.domain.Shop;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -56,7 +55,6 @@ public class SearchDaoImpl implements SearchDao {
|
||||
"contractors.internationalLegalEntityLegalName",
|
||||
"contractors.internationalLegalEntityTradingName")
|
||||
.query(text)
|
||||
.type(TextQueryType.Phrase)
|
||||
.build()))
|
||||
.scoreMode(ChildScoreMode.Sum)
|
||||
.build().query();
|
||||
@ -70,7 +68,6 @@ public class SearchDaoImpl implements SearchDao {
|
||||
"contracts.legalAgreementId",
|
||||
"contracts.reportActSignerFullName")
|
||||
.query(text)
|
||||
.type(TextQueryType.Phrase)
|
||||
.build()))
|
||||
.scoreMode(ChildScoreMode.Sum)
|
||||
.build().query();
|
||||
@ -81,7 +78,6 @@ public class SearchDaoImpl implements SearchDao {
|
||||
.fields("id",
|
||||
"email")
|
||||
.query(text)
|
||||
.type(TextQueryType.Phrase)
|
||||
.build());
|
||||
}
|
||||
|
||||
@ -93,7 +89,6 @@ public class SearchDaoImpl implements SearchDao {
|
||||
"shops.locationUrl",
|
||||
"shops.detailsName")
|
||||
.query(text)
|
||||
.type(TextQueryType.Phrase)
|
||||
.build()))
|
||||
.scoreMode(ChildScoreMode.Sum)
|
||||
.build().query();
|
||||
@ -106,7 +101,6 @@ public class SearchDaoImpl implements SearchDao {
|
||||
.fields("wallets.id",
|
||||
"wallets.name")
|
||||
.query(text)
|
||||
.type(TextQueryType.Phrase)
|
||||
.build()))
|
||||
.scoreMode(ChildScoreMode.Sum)
|
||||
.build().query();
|
||||
|
@ -54,18 +54,6 @@ public class ReadTest extends AbstractIntegrationTest {
|
||||
.anyMatch(partySearchHit -> partySearchHit.getParty().getEmail().contains(EMAIL)));
|
||||
}
|
||||
|
||||
@Test
|
||||
void searchByPartyIdWithoutTokens() throws TException {
|
||||
givenParty(PARTY + "-test-kek", EMAIL + "1");
|
||||
givenParty(PARTY + "-test-lol", EMAIL + "2");
|
||||
givenParty(PARTY + "-test-rofl", EMAIL + "3");
|
||||
givenParty(PARTY + "-test-ricardo", EMAIL + "4");
|
||||
givenParty(PARTY + "-test-milos", EMAIL + "5");
|
||||
refreshIndices();
|
||||
List<SearchHit> searchHits = deanonimusServiceHandler.searchParty(PARTY + "-test-lol");
|
||||
|
||||
assertEquals(1, searchHits.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
void searchByPartyEmail() throws TException {
|
||||
|
Loading…
Reference in New Issue
Block a user