mirror of
https://github.com/valitydev/deanonimus.git
synced 2024-11-06 02:05:16 +00:00
Merge pull request #6 from rbkmoney/ft/party-id-search-fixed
Fixed several parties search
This commit is contained in:
commit
23481a7280
@ -23,6 +23,7 @@ import java.util.Optional;
|
||||
public class Party {
|
||||
|
||||
@Id
|
||||
@Field(type = FieldType.Keyword)
|
||||
private String id;
|
||||
@Field(type = FieldType.Text, analyzer = "autocomplete", searchAnalyzer = "standard")
|
||||
private String email;
|
||||
|
@ -49,6 +49,19 @@ public class ReadTest extends IntegrationTestBase {
|
||||
.anyMatch(partySearchHit -> partySearchHit.getParty().getEmail().contains(EMAIL)));
|
||||
}
|
||||
|
||||
@Test
|
||||
public 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");
|
||||
|
||||
List<SearchHit> searchHits = deanonimusServiceHandler.searchParty(PARTY + "-test-lol");
|
||||
|
||||
Assert.assertEquals(1, searchHits.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void searchByPartyEmail() throws TException {
|
||||
givenParty(PARTY, EMAIL);
|
||||
|
Loading…
Reference in New Issue
Block a user