Skip to content

Commit

Permalink
Use keyword analyer for taxon id searches
Browse files Browse the repository at this point in the history
  • Loading branch information
mdoering committed Oct 12, 2020
1 parent 99963de commit 382f789
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dao/src/main/java/life/catalogue/es/EsNameUsage.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class EsNameUsage {
private TaxonomicStatus status;
private Set<Issue> issues;
private Set<Environment> environments;
@Analyzers(STANDARD_ASCII)
@Analyzers(KEYWORD)
private List<String> classificationIds;
private Boolean extinct;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ public void testTaxonId1() {
List<NameUsageWrapper> expected = Arrays.asList(nuw1, nuw2, nuw3);
assertEquals(expected, search(query).getResult());

query = new NameUsageSearchRequest();
query.addFilter(TAXON_ID, "4");
expected = Arrays.asList(nuw2, nuw3, nuw4);
assertEquals(expected, search(query).getResult());

countdown(TAXON_ID);
}

Expand Down

0 comments on commit 382f789

Please sign in to comment.