diff --git a/src/main/java/tla/backend/es/query/SentenceSearchQueryBuilder.java b/src/main/java/tla/backend/es/query/SentenceSearchQueryBuilder.java index 89d7f505..20c6c246 100644 --- a/src/main/java/tla/backend/es/query/SentenceSearchQueryBuilder.java +++ b/src/main/java/tla/backend/es/query/SentenceSearchQueryBuilder.java @@ -30,7 +30,7 @@ public void setContext(Context context) { if (textId != null) { log.info("sentence query: receive {} textIDs", textId); textQuery.must(QueryBuilders.termQuery("context.textId", textId)); // Set text ID of which sentences should be retrieved - textQuery.mustNot(QueryBuilders.regexpQuery("id", ".*\\-([0-9][1-9]|[0-9]+[0-9][0-9])")); // Sort out all sentence reading variants except for "-00" + textQuery.must(QueryBuilders.regexpQuery("id", "[^\\-]*|.*\\-00")); // Sort out all sentence reading variants except for "-00" this.filter(textQuery); }