Skip to content

Commit

Permalink
Merge pull request #32605 from vespa-engine/arnej/get-gid-even-if-moved
Browse files Browse the repository at this point in the history
use metaStore.getGidEvenIfMoved group grouping hits also
  • Loading branch information
havardpe authored Oct 16, 2024
2 parents c7e7053 + f39f974 commit 1e56af3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ ResultProcessor::makeReply(PartialResultUP full_result)
uint32_t docId = src.getDocId();
if (_metaStore.getGidEvenIfMoved(docId, gid)) {
dst.gid = gid;
} else {
LOG(warning, "Missing globalid for hit %u", docId);
}
dst.metric = src.getRank();
LOG(debug, "convertLidToGid: hit[%zu]: lid(%u) -> gid(%s)", i, docId, dst.gid.toString().c_str());
Expand Down
7 changes: 5 additions & 2 deletions searchlib/src/vespa/searchlib/aggregation/grouping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,11 @@ class GlobalIdConverter : public vespalib::ObjectOperation, public vespalib::Obj
void execute(vespalib::Identifiable & obj) override {
FS4Hit & hit = static_cast<FS4Hit &>(obj);
document::GlobalId gid;
_metaStore.getGid(hit.getDocId(), gid);
hit.setGlobalId(gid);
if (_metaStore.getGidEvenIfMoved(hit.getDocId(), gid)) {
hit.setGlobalId(gid);
} else {
LOG(warning, "Missing globalid for grouping hit %u", hit.getDocId());
}
LOG(debug, "GlobalIdConverter: lid(%u) -> gid(%s)", hit.getDocId(), hit.getGlobalId().toString().c_str());
}
bool check(const vespalib::Identifiable & obj) const override {
Expand Down

0 comments on commit 1e56af3

Please sign in to comment.