diff options
author | Tor Egge <tegge@oath.com> | 2019-01-15 22:51:16 +0000 |
---|---|---|
committer | Tor Egge <tegge@oath.com> | 2019-01-15 22:51:16 +0000 |
commit | 79e7203467a0a62e729f30ec9868e8f442bb5a37 (patch) | |
tree | 90e9139e0f930067893db5345d3788c361c1c137 | |
parent | eda8c867de1695a59ab96887d42b5fd158dcb038 (diff) |
Add workaround for source selector corruption.
-rw-r--r-- | searchcorespi/src/vespa/searchcorespi/index/fusionrunner.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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]); } |