From 49a548ab3ad86f05031ec7ffa732034d3dcbd390 Mon Sep 17 00:00:00 2001 From: Ryan Clancy Date: Fri, 27 Sep 2019 16:31:09 -0400 Subject: [PATCH] Catch NPE introduced in recent commit. (#816) * Catch NPE introduced in recent commit. * Update known issues. --- docs/known-issues/known-issues-v0.6.0.md | 3 ++- .../java/io/anserini/rerank/lib/ScoreTiesAdjusterReranker.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/known-issues/known-issues-v0.6.0.md b/docs/known-issues/known-issues-v0.6.0.md index b779a6526d..d1f9668115 100644 --- a/docs/known-issues/known-issues-v0.6.0.md +++ b/docs/known-issues/known-issues-v0.6.0.md @@ -1,3 +1,4 @@ # Anserini Known Issues (v0.6.0) -+ Solr indexing for Washington Post broke due to [417ac12](https://github.com/castorini/anserini/commit/c5ee9af442c500ec43fc28808903cfca2417ac12) and has been fixed in [#807](https://github.com/castorini/anserini/pull/807) and [#809](https://github.com/castorini/anserini/pull/809). \ No newline at end of file ++ Solr indexing for Washington Post broke due to [417ac12](https://github.com/castorini/anserini/commit/c5ee9af442c500ec43fc28808903cfca2417ac12) and has been fixed in [#807](https://github.com/castorini/anserini/pull/807) and [#809](https://github.com/castorini/anserini/pull/809). ++ SearchSolr is broken due to [72b8052](https://github.com/castorini/anserini/commit/ca253a4794b5f5bea38749bd40e5f9f4272b8052) and has been fixed in [#816](https://github.com/castorini/anserini/pull/816). \ No newline at end of file diff --git a/src/main/java/io/anserini/rerank/lib/ScoreTiesAdjusterReranker.java b/src/main/java/io/anserini/rerank/lib/ScoreTiesAdjusterReranker.java index 33871af96b..34d0d8c963 100644 --- a/src/main/java/io/anserini/rerank/lib/ScoreTiesAdjusterReranker.java +++ b/src/main/java/io/anserini/rerank/lib/ScoreTiesAdjusterReranker.java @@ -28,7 +28,7 @@ public class ScoreTiesAdjusterReranker implements Reranker { @Override public ScoredDocuments rerank(ScoredDocuments docs, RerankerContext context) { - if (context.getSearchArgs().arbitraryScoreTieBreak) { + if (context != null && context.getSearchArgs().arbitraryScoreTieBreak) { return docs; }