Skip to content

Commit 89a0d53

Browse files
committed
Textsätze-Suche: keine Varianten außer "-00"
1 parent 31ce725 commit 89a0d53

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/tla/backend/es/query/SentenceSearchQueryBuilder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ public void setContext(Context context) {
2929
String textId = context.getTextId();
3030
if (textId != null) {
3131
log.info("sentence query: receive {} textIDs", textId);
32-
textQuery.must(QueryBuilders.termQuery("context.textId", textId));
32+
textQuery.must(QueryBuilders.termQuery("context.textId", textId)); // Set text ID of which sentences should be retrieved
33+
textQuery.mustNot(QueryBuilders.regexpQuery("id", ".*\\-([0-9][1-9]|[0-9]+[0-9][0-9])")); // Sort out all sentence reading variants except for "-00"
3334
this.filter(textQuery);
3435
}
3536

0 commit comments

Comments
 (0)