summaryrefslogtreecommitdiffstats
path: root/searchcommon
diff options
context:
space:
mode:
authorGeir Storli <geirst@oath.com>2018-04-18 09:00:53 +0000
committerGeir Storli <geirst@oath.com>2018-04-18 13:41:59 +0000
commit6c663456f150aaaab0c1795d628ae89f839d2fb1 (patch)
tree7fe90b74801c9722c17507da4519cf4d52eb8522 /searchcommon
parentef08ce308ffd220a02500dac4ce5e231cc022b18 (diff)
Use ISearchContext instead of AttributeVector::SearchContext in ImportedSearchContext.
Diffstat (limited to 'searchcommon')
-rw-r--r--searchcommon/src/vespa/searchcommon/attribute/i_search_context.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/searchcommon/src/vespa/searchcommon/attribute/i_search_context.h b/searchcommon/src/vespa/searchcommon/attribute/i_search_context.h
index 7dff0bf1c4d..4be1f00dcbc 100644
--- a/searchcommon/src/vespa/searchcommon/attribute/i_search_context.h
+++ b/searchcommon/src/vespa/searchcommon/attribute/i_search_context.h
@@ -21,6 +21,13 @@ namespace attribute {
class ISearchContext {
public:
using UP = std::unique_ptr<ISearchContext>;
+ using DocId = uint32_t;
+
+private:
+ virtual bool onCmp(DocId docId, int32_t &weight) const = 0;
+ virtual bool onCmp(DocId docId) const = 0;
+
+public:
virtual ~ISearchContext() {}
virtual unsigned int approximateHits() const = 0;
@@ -50,6 +57,9 @@ public:
virtual const QueryTermBase &queryTerm() const = 0;
virtual const vespalib::string &attributeName() const = 0;
+ bool cmp(DocId docId, int32_t &weight) const { return onCmp(docId, weight); }
+ bool cmp(DocId docId) const { return onCmp(docId); }
+
};
}