summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorGeir Storli <geirst@yahoo-inc.com>2017-03-14 14:11:06 +0000
committerGeir Storli <geirst@yahoo-inc.com>2017-03-14 14:11:06 +0000
commit4d641153080e1e8fc5dfdd4bbf636887413e68ca (patch)
tree40b2826c5838954325dd9b422af9b5b369c3ad02 /searchlib
parent880ce3b68950dc86be0f6d5ae79813ac2c3e8b32 (diff)
Move search::attribute::ISearchContext to searchcommon in preparation of extending IAttributeVector API.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/attribute/attribute_weighted_set_blueprint.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/attributevector.h4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/isearchcontext.h70
-rw-r--r--searchlib/src/vespa/searchlib/common/range.h30
4 files changed, 3 insertions, 103 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/attribute_weighted_set_blueprint.cpp b/searchlib/src/vespa/searchlib/attribute/attribute_weighted_set_blueprint.cpp
index bfdabe8121d..aeccad63cf6 100644
--- a/searchlib/src/vespa/searchlib/attribute/attribute_weighted_set_blueprint.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/attribute_weighted_set_blueprint.cpp
@@ -1,7 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "attribute_weighted_set_blueprint.h"
-#include "isearchcontext.h"
+#include <vespa/searchcommon/attribute/i_search_context.h>
#include <vespa/searchlib/queryeval/weighted_set_term_search.h>
#include <vespa/searchlib/query/queryterm.h>
#include <vespa/searchlib/common/bitvector.h>
diff --git a/searchlib/src/vespa/searchlib/attribute/attributevector.h b/searchlib/src/vespa/searchlib/attribute/attributevector.h
index 496b6cdfbf5..e2f1dee567f 100644
--- a/searchlib/src/vespa/searchlib/attribute/attributevector.h
+++ b/searchlib/src/vespa/searchlib/attribute/attributevector.h
@@ -5,16 +5,16 @@
#include "address_space_usage.h"
#include "iattributesavetarget.h"
#include "changevector.h"
-#include "isearchcontext.h"
#include <vespa/fastlib/text/normwordfolder.h>
#include <vespa/searchcommon/attribute/config.h>
+#include <vespa/searchcommon/attribute/i_search_context.h>
#include <vespa/searchcommon/attribute/iattributevector.h>
#include <vespa/searchcommon/attribute/status.h>
+#include <vespa/searchcommon/common/range.h>
#include <vespa/searchcommon/common/undefinedvalues.h>
#include <vespa/searchlib/common/address_space.h>
#include <vespa/searchlib/common/i_compactable_lid_space.h>
#include <vespa/searchlib/common/identifiable.h>
-#include <vespa/searchlib/common/range.h>
#include <vespa/searchlib/common/rcuvector.h>
#include <vespa/searchlib/queryeval/searchiterator.h>
#include <vespa/vespalib/objects/identifiable.h>
diff --git a/searchlib/src/vespa/searchlib/attribute/isearchcontext.h b/searchlib/src/vespa/searchlib/attribute/isearchcontext.h
deleted file mode 100644
index b59b09050c1..00000000000
--- a/searchlib/src/vespa/searchlib/attribute/isearchcontext.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
-#pragma once
-
-#include <vespa/searchlib/common/range.h>
-
-namespace search {
-
-namespace fef {
- class TermFieldMatchData;
-}
-namespace queryeval {
- class SearchIterator;
-}
-
-class QueryTermBase;
-
-namespace attribute {
-
-
- class ISearchContext {
- public:
- virtual ~ISearchContext() {}
-
- virtual unsigned int approximateHits() const = 0;
-
- /**
- * Creates an attribute search iterator associated with this
- * search context.
- *
- * @return attribute search iterator
- *
- * @param matchData the attribute match data used when
- * unpacking data for a hit
- *
- * @param strict whether the iterator should be strict or not
- *
- * @param useBitVector whether bitvectors should be used when available
- **/
- virtual std::unique_ptr<queryeval::SearchIterator>
- createIterator(fef::TermFieldMatchData *matchData, bool strict) = 0;
-
- /**
- * Creates an attribute search iterator associated with this
- * search context. Postings lists are not used.
- *
- * @return attribute search iterator
- *
- * @param matchData the attribute match data used when
- * unpacking data for a hit
- *
- * @param strict whether the iterator should be strict or not
- **/
- virtual std::unique_ptr<queryeval::SearchIterator>
- createFilterIterator(fef::TermFieldMatchData *matchData, bool strict) = 0;
-
- /*
- * Create temporary posting lists. Should be called before
- * createIterator is called.
- */
- virtual void fetchPostings(bool strict) = 0;
- virtual bool valid() const = 0;
- virtual Int64Range getAsIntegerTerm() const = 0;
-
- virtual const QueryTermBase & queryTerm() const = 0;
-
- };
-
-}
-}
diff --git a/searchlib/src/vespa/searchlib/common/range.h b/searchlib/src/vespa/searchlib/common/range.h
deleted file mode 100644
index f33630daaf4..00000000000
--- a/searchlib/src/vespa/searchlib/common/range.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
-
-#pragma once
-
-namespace search
-{
-
-template <typename T>
-class Range {
-public:
- Range() :
- _lower(std::numeric_limits<T>::max()),
- _upper(std::numeric_limits<T>::min()) { }
- Range(T v) : _lower(v), _upper(v) { }
- Range(T low, T high) : _lower(low), _upper(high) { }
- T lower() const { return _lower; }
- T upper() const { return _upper; }
- bool valid() const { return _lower <= _upper; }
- bool isPoint() const { return _lower == _upper; }
-private:
- T _lower;
- T _upper;
-};
-
-using Int64Range = Range<int64_t>;
-
-} // namespace search
-