diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-01-20 11:48:51 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-01-20 11:50:04 +0100 |
commit | d23d661d8868677218f33dfe7e9b01f5de65d6f8 (patch) | |
tree | ada91c7f283c2491b7c62b1b2de195cc13846586 /streamingvisitors/src/vespa/searchvisitor/hitcollector.h | |
parent | d11e6f1df4a59142ce1866f44f1b158b5bd6fba0 (diff) |
Clean up a very dangerous interface to prevent potential misuse.
Diffstat (limited to 'streamingvisitors/src/vespa/searchvisitor/hitcollector.h')
-rw-r--r-- | streamingvisitors/src/vespa/searchvisitor/hitcollector.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/streamingvisitors/src/vespa/searchvisitor/hitcollector.h b/streamingvisitors/src/vespa/searchvisitor/hitcollector.h index ea4a20c187b..5f9d1d4a4bb 100644 --- a/streamingvisitors/src/vespa/searchvisitor/hitcollector.h +++ b/streamingvisitors/src/vespa/searchvisitor/hitcollector.h @@ -22,7 +22,7 @@ private: class Hit { public: - Hit(const vsm::StorageDocument::SP & doc, uint32_t docId, const search::fef::MatchData & matchData, + Hit(const vsm::StorageDocument::LP & doc, uint32_t docId, const search::fef::MatchData & matchData, double score, const void * sortData, size_t sortDataLen) : _docid(docId), _score(score), @@ -35,10 +35,10 @@ private: _matchData.emplace_back(*matchData.resolveTermField(handle)); } } - Hit(const vsm::StorageDocument::SP & doc, uint32_t docId, const search::fef::MatchData & matchData, double score) + Hit(const vsm::StorageDocument::LP & doc, uint32_t docId, const search::fef::MatchData & matchData, double score) : Hit(doc, docId, matchData, score, nullptr, 0) {} search::DocumentIdT getDocId() const { return _docid; } - const vsm::StorageDocument::SP & getDocument() const { return _document; } + const vsm::StorageDocument::LP & getDocument() const { return _document; } const std::vector<search::fef::TermFieldMatchData> &getMatchData() const { return _matchData; } search::feature_t getRankScore() const { return _score; } const vespalib::string & getSortBlob() const { return _sortBlob; } @@ -70,7 +70,7 @@ private: private: uint32_t _docid; double _score; - vsm::StorageDocument::SP _document; + vsm::StorageDocument::LP _document; std::vector<search::fef::TermFieldMatchData> _matchData; vespalib::string _sortBlob; }; @@ -104,7 +104,7 @@ public: * @param data The match data for the hit. * @return true if the document was added to the heap **/ - bool addHit(const vsm::StorageDocument::SP & doc, uint32_t docId, const search::fef::MatchData & data, double score); + bool addHit(const vsm::StorageDocument::LP & doc, uint32_t docId, const search::fef::MatchData & data, double score); /** * Adds a hit to this hit collector. @@ -118,7 +118,7 @@ public: * @param sortDataLen The length of the sortdata. * @return true if the document was added to the heap **/ - bool addHit(const vsm::StorageDocument::SP & doc, uint32_t docId, const search::fef::MatchData & data, + bool addHit(const vsm::StorageDocument::LP & doc, uint32_t docId, const search::fef::MatchData & data, double score, const void * sortData, size_t sortDataLen); /** |