summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorArne Juul <arnej@verizonmedia.com>2020-07-10 18:09:32 +0000
committerArne Juul <arnej@verizonmedia.com>2020-07-15 15:39:22 +0000
commit8dbe4463f65e452fec603971a7126014c970325c (patch)
treee9c455a93d6640d12271ddb0cc4fe26bce5be710 /searchlib
parent2ef06d7de7cd52c9c41c6275413688e4359f979f (diff)
more cleanup, rename currently-unused methods
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/common/geo_location_spec.cpp8
-rw-r--r--searchlib/src/vespa/searchlib/common/geo_location_spec.h4
-rw-r--r--searchlib/src/vespa/searchlib/common/location.cpp14
-rw-r--r--searchlib/src/vespa/searchlib/common/location.h2
-rw-r--r--searchlib/src/vespa/searchlib/query/tree/location.h2
5 files changed, 9 insertions, 21 deletions
diff --git a/searchlib/src/vespa/searchlib/common/geo_location_spec.cpp b/searchlib/src/vespa/searchlib/common/geo_location_spec.cpp
index fc1cfc4e99c..6c517365ecc 100644
--- a/searchlib/src/vespa/searchlib/common/geo_location_spec.cpp
+++ b/searchlib/src/vespa/searchlib/common/geo_location_spec.cpp
@@ -44,7 +44,7 @@ GeoLocationSpec::GeoLocationSpec() :
std::string
-GeoLocationSpec::getLocationString() const
+GeoLocationSpec::getOldFormatLocationString() const
{
vespalib::asciistream loc;
if (hasPoint()) {
@@ -71,12 +71,12 @@ GeoLocationSpec::getLocationString() const
}
std::string
-GeoLocationSpec::getLocationStringWithField() const
+GeoLocationSpec::getOldFormatLocationStringWithField() const
{
if (hasFieldName()) {
- return getFieldName() + ":" + getLocationString();
+ return getFieldName() + ":" + getOldFormatLocationString();
} else {
- return getLocationString();
+ return getOldFormatLocationString();
}
}
diff --git a/searchlib/src/vespa/searchlib/common/geo_location_spec.h b/searchlib/src/vespa/searchlib/common/geo_location_spec.h
index 853ad43ff46..bdbce2c486c 100644
--- a/searchlib/src/vespa/searchlib/common/geo_location_spec.h
+++ b/searchlib/src/vespa/searchlib/common/geo_location_spec.h
@@ -27,8 +27,8 @@ public:
int32_t getMaxX() const { return _max_x; }
int32_t getMaxY() const { return _max_y; }
- std::string getLocationString() const;
- std::string getLocationStringWithField() const;
+ std::string getOldFormatLocationString() const;
+ std::string getOldFormatLocationStringWithField() const;
std::string getFieldName() const { return _field_name; }
protected:
diff --git a/searchlib/src/vespa/searchlib/common/location.cpp b/searchlib/src/vespa/searchlib/common/location.cpp
index ff87d5a260c..51476658953 100644
--- a/searchlib/src/vespa/searchlib/common/location.cpp
+++ b/searchlib/src/vespa/searchlib/common/location.cpp
@@ -8,7 +8,7 @@ namespace search::common {
Location::Location() : _zBoundingBox(0,0,0,0) {}
Location::Location(const GeoLocationSpec &other)
- : _zBoundingBox(0,0,0,0)
+ : Location()
{
setSpec(other);
}
@@ -25,16 +25,4 @@ Location::setSpec(const GeoLocationSpec &other)
}
}
-
-#if 0
-bool Location::parse(const std::string &locStr) {
- bool valid = GeoLocationSpec::parseOldFormat(locStr);
- if (valid) {
- _zBoundingBox = vespalib::geo::ZCurve::BoundingBox(getMinX(), getMaxX(),
- getMinY(), getMaxY());
- }
- return valid;
-}
-#endif
-
} // namespace
diff --git a/searchlib/src/vespa/searchlib/common/location.h b/searchlib/src/vespa/searchlib/common/location.h
index c73fe7b817c..29f3c71fdb5 100644
--- a/searchlib/src/vespa/searchlib/common/location.h
+++ b/searchlib/src/vespa/searchlib/common/location.h
@@ -24,10 +24,8 @@ public:
bool getzFailBoundingBoxTest(int64_t docxy) const {
return _zBoundingBox.getzFailBoundingBoxTest(docxy);
}
- // bool parse(const std::string &locStr);
void setSpec(const GeoLocationSpec& other);
private:
- GeoLocationSpec _spec;
vespalib::geo::ZCurve::BoundingBox _zBoundingBox;
};
diff --git a/searchlib/src/vespa/searchlib/query/tree/location.h b/searchlib/src/vespa/searchlib/query/tree/location.h
index e1826c7184a..889fa167c43 100644
--- a/searchlib/src/vespa/searchlib/query/tree/location.h
+++ b/searchlib/src/vespa/searchlib/query/tree/location.h
@@ -6,6 +6,8 @@
namespace vespalib { class asciistream; }
namespace search::query {
+
+// for unit tests:
struct Point;
struct Rectangle;