mirror of
https://github.com/valitydev/deanonimus.git
synced 2024-11-06 02:05:16 +00:00
Fixed several parties search
This commit is contained in:
parent
392916db6e
commit
0493f47d3d
@ -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