diff options
author | Tor Egge <Tor.Egge@yahoo-inc.com> | 2016-11-17 00:13:26 +0000 |
---|---|---|
committer | Tor Egge <Tor.Egge@yahoo-inc.com> | 2016-11-17 00:13:26 +0000 |
commit | aea064169f3c4a719a9d375f017fd39b61a0c502 (patch) | |
tree | c22d10b2da084fed091df2e331f9c50813aff980 | |
parent | efdb9fbb0b936e0b674da1317a98284d91129a35 (diff) |
Use new API to get values from multi value mapping when calculating
posting change.
-rw-r--r-- | searchlib/src/vespa/searchlib/attribute/postingchange.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/postingchange.cpp b/searchlib/src/vespa/searchlib/attribute/postingchange.cpp index 15da16e73fb..b0cd11410f8 100644 --- a/searchlib/src/vespa/searchlib/attribute/postingchange.cpp +++ b/searchlib/src/vespa/searchlib/attribute/postingchange.cpp @@ -317,10 +317,9 @@ compute(const MultivalueMapping & mvm, const DocIndices & docIndices, // generate add postings and remove postings for (const auto & docIndex : docIndices) { - const WeightedIndex * oldIndices = NULL; - uint32_t valueCount = mvm.get(docIndex.first, oldIndices); + vespalib::ConstArrayRef<WeightedIndex> oldIndices(mvm.get(docIndex.first)); added.clear(), changed.clear(), removed.clear(); - actualChange.compute(&docIndex.second[0], docIndex.second.size(), oldIndices, valueCount, + actualChange.compute(&docIndex.second[0], docIndex.second.size(), &oldIndices[0], oldIndices.size(), added, changed, removed); for (const auto & wi : added) { changePost[EnumPostingPair(wi.value(), &compare)].add(docIndex.first, wi.weight()); |