From 79e7203467a0a62e729f30ec9868e8f442bb5a37 Mon Sep 17 00:00:00 2001 From: Tor Egge Date: Tue, 15 Jan 2019 22:51:16 +0000 Subject: Add workaround for source selector corruption. --- searchcorespi/src/vespa/searchcorespi/index/fusionrunner.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'searchcorespi') diff --git a/searchcorespi/src/vespa/searchcorespi/index/fusionrunner.cpp b/searchcorespi/src/vespa/searchcorespi/index/fusionrunner.cpp index 849a591c339..b5d3086d11e 100644 --- a/searchcorespi/src/vespa/searchcorespi/index/fusionrunner.cpp +++ b/searchcorespi/src/vespa/searchcorespi/index/fusionrunner.cpp @@ -55,6 +55,11 @@ void readSelectorArray(const string &selector_name, SelectorArray &selector_arra auto it = selector->createIterator(); for (uint32_t i = 0; i < num_docs; ++i) { search::queryeval::Source source = it->getSource(i); + // Workaround for source selector corruption. + // Treat out of range source as last source. + if (source >= id_map.size()) { + source = id_map.size() - 1; + } assert(source < id_map.size()); selector_array.push_back(id_map[source]); } -- cgit v1.2.3