Skip to content

Commit

Permalink
Don't throw warnings on expansion failures (fixes #155)
Browse files Browse the repository at this point in the history
Change-Id: Ic0f7fda33b928027f6356a7b920f2377f6eab320
  • Loading branch information
Akron committed Aug 5, 2024
1 parent 67d0b8d commit c6b4542
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- [feature] Temporarily add all requested fields in flat legacy fields
maps (diewald)
- [bugfix] Fix empty DocIdSetIterator (margaretha)
- [bugfix] Don't throw warnings on expansion failure (diewald)

0.63.0 2024-06-24
- [bugfix] Show all inline markers and pagebreaks at match borders (diewald).
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/de/ids_mannheim/korap/response/Match.java
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@ public void expandContextToSpan (String element) {
this.positionsToOffset.clear();
}
else {
this.addWarning(651, "Unable to extend context");
this.addMessage(651, "Unable to extend context");
};
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ public void indexExample7SentenceExpansionWarning ()
true); // extendToSentence

JsonNode res = mapper.readTree(km.toJsonString());
assertEquals("Unable to extend context", res.at("/warnings/0/1").asText());
assertEquals("Unable to extend context", res.at("/messages/0/1").asText());

QueryBuilder kq = new QueryBuilder("tokens");
Krill ks = new Krill(kq.tag("base/s:s"));
Expand Down

0 comments on commit c6b4542

Please sign in to comment.