Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to graphANNIS 3.2.0 #847

Merged
merged 2 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]


### Fixed

- Avoid null pointer exceptions when merging corpus configs for search
options.
- Do not add "annis:doc" labels to sub-corpora when importing relANNIS corpora.
This will fix queries where you just search for documents, e.g. by `annis:doc`
but previously also got the sub-corpora as result. This bug only occurred in
corpora with sub-corpora and for the document searches.
- Avoid null pointer exceptions when merging corpus configs for search options.
- Updated to graphANNIS 3.2.0 which contains several performance improvements
for working with large corpora (>10 million token). You might have to
re-import the corpora to get the full performance improvement, because a new
graph storage implementation and statistics have been added.
- Omit the document count for results where there are no matches inside a
document, but only the documents or sub-corpora themselves. A document count
of 0 would otherwise be very confusing.


## [4.11.0] - 2024-02-09

Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<vaadin.version>8.14.3</vaadin.version>
<vaadin.productionMode>true</vaadin.productionMode>
<start-class>org.corpus_tools.annis.gui.AnnisUiApplication</start-class>
<graphannis.version>3.1.1</graphannis.version>
<graphannis.version>3.2.0</graphannis.version>
<antlr4.version>4.7.2</antlr4.version>
<spring.profiles.active>server</spring.profiles.active>
<swagger-core-version>1.5.24</swagger-core-version>
Expand Down Expand Up @@ -261,7 +261,7 @@
https://github.com/korpling/graphANNIS/releases/download/v${graphannis.version}/graphannis-webservice-x86_64-unknown-linux-gnu.tar.xz</url>
<outputDirectory>
${project.build.directory}/native/</outputDirectory>
<sha256>8c1265d164d919c998773bb6aa095ac5f931182d0c2f6296e860cbfecd1dc58c</sha256>
<sha256>a22a26f2af3e3c9971a2f657ef41a20ae8759f1572a57ab2a5ad7b55940dc1b9</sha256>
<unpack>true</unpack>
</configuration>
</execution>
Expand All @@ -276,7 +276,7 @@
https://github.com/korpling/graphANNIS/releases/download/v${graphannis.version}/graphannis-webservice-x86_64-pc-windows-msvc.zip</url>
<outputDirectory>
${project.build.directory}/native/win32-x86-64/</outputDirectory>
<sha256>1d4b583bca79633d307673288295ec2eae70539ce145ba619f055792f2f874af</sha256>
<sha256>9d5eb40fa008d8228260a91cadf5eeee372ff85b6acd416df55f96b475a1f874</sha256>
<unpack>true</unpack>
</configuration>
</execution>
Expand All @@ -291,7 +291,7 @@
https://github.com/korpling/graphANNIS/releases/download/v${graphannis.version}/graphannis-webservice-x86_64-apple-darwin.tar.xz</url>
<outputDirectory>
${project.build.directory}/native/</outputDirectory>
<sha256>f1b56d73069546f2e55542a4bf6aba6dfeac179a8c6d17fbd736450d602eb72e</sha256>
<sha256>a2c0741409c381930a7cb566465fa8ba29343f5654cfe8db91fa1f7e56fdd9e4</sha256>
<unpack>true</unpack>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,26 @@ public void onFailure(ApiException e, int statusCode,

@Override
public void onSuccess(CountExtra result, int statusCode,
Map<String, List<String>> responseHeaders) {
ui.access(() -> {
ui.getQueryState().getExecutedTasks().remove(QueryUIState.QueryType.COUNT);
Map<String, List<String>> responseHeaders) {
ui.access(() -> {
ui.getQueryState().getExecutedTasks().remove(QueryUIState.QueryType.COUNT);

String documentString = result.getDocumentCount() > 1 ? "documents" : "document";
String matchesString = result.getMatchCount() > 1 ? "matches" : "match";
ui.getSearchView().getControlPanel().getQueryPanel()
.setStatus("" + result.getMatchCount() + " " + matchesString + "\nin "
+ result.getDocumentCount() + " " + documentString);
if (result.getMatchCount() > 0 && panel != null) {
panel.getPaging().setPageSize(pageSize, false);
panel.setCount(result.getMatchCount());
}
ui.getSearchView().getControlPanel().getQueryPanel().setCountIndicatorEnabled(false);
});
// Decide whether to use plural
String documentString = result.getDocumentCount() > 1 ? "documents" : "document";
String matchesString = result.getMatchCount() > 1 ? "matches" : "match";
// Construct the whole string, but omit the document count if it is zero (e.g. because
// there are only sub-corpus or document matches and no matches inside a document)
String completeString =
result.getDocumentCount() == 0 ? "" + result.getMatchCount() + " " + matchesString
: "" + result.getMatchCount() + " " + matchesString + "\nin "
+ result.getDocumentCount() + " " + documentString;
ui.getSearchView().getControlPanel().getQueryPanel().setStatus(completeString);
if (result.getMatchCount() > 0 && panel != null) {
panel.getPaging().setPageSize(pageSize, false);
panel.setCount(result.getMatchCount());
}
ui.getSearchView().getControlPanel().getQueryPanel().setCountIndicatorEnabled(false);
});
}

@Override
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/corpus_tools/annis/gui/AnnisUITest.java
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ void searchPccDocumentMatches() throws Exception {
_click(searchButton);

// Wait until the count is displayed
String expectedStatus = "2 matches\nin 2 documents";
String expectedStatus = "2 matches";
awaitCondition(60,
() -> expectedStatus
.equals(ui.getSearchView().getControlPanel().getQueryPanel().getLastPublicStatus()),
Expand Down Expand Up @@ -392,7 +392,7 @@ void searchPccCorpusMatches() throws Exception {
Thread.sleep(500);

// Wait until the count is displayed
String expectedStatus = "1 match\nin 1 document";
String expectedStatus = "1 match";
awaitCondition(60,
() -> expectedStatus
.equals(ui.getSearchView().getControlPanel().getQueryPanel().getLastPublicStatus()),
Expand Down
Loading