Skip to content

Commit f014223

Browse files
committed
Fix variant filter (hex!)
1 parent 89a0d53 commit f014223

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public void setContext(Context context) {
3030
if (textId != null) {
3131
log.info("sentence query: receive {} textIDs", textId);
3232
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"
33+
textQuery.must(QueryBuilders.regexpQuery("id", "[^\\-]*|.*\\-00")); // Sort out all sentence reading variants except for "-00"
3434
this.filter(textQuery);
3535
}
3636

0 commit comments

Comments
 (0)