diff options
Diffstat (limited to 'searchlib')
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; |