diff options
author | Arne Juul <arnej@verizonmedia.com> | 2020-07-13 10:18:12 +0000 |
---|---|---|
committer | Arne Juul <arnej@verizonmedia.com> | 2020-07-15 15:39:22 +0000 |
commit | f45f753bf9b91263342eb5f29ad4d0c442b2c6a0 (patch) | |
tree | 7c808c92d3766081669fc28eeffa14bb129d396a /searchcore | |
parent | 6abfeaca106f70daa32616dbec4ed39b2b9bb35c (diff) |
handle locations in query for getdocsum
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.cpp | 25 | ||||
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.h | 1 |
2 files changed, 0 insertions, 26 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.cpp b/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.cpp index 38e7e37a82d..0dbffe2402a 100644 --- a/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.cpp +++ b/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.cpp @@ -181,31 +181,6 @@ DocsumContext::FillRankFeatures(search::docsummary::GetDocsumsState * state, sea state->_rankFeatures = _matcher->getRankFeatures(_request, _searchCtx, _attrCtx, _sessionMgr); } -void -DocsumContext::ParseLocation(search::docsummary::GetDocsumsState *state) -{ - search::common::GeoLocationParser locationParser; - if (locationParser.parseOldFormatWithField(_request.location)) { - auto spec = locationParser.spec(); - LOG(debug, "Filling document locations from location string: %s", - _request.location.c_str()); - string view = spec.getFieldName(); - AttributeGuard::UP vec = _attrMgr.getAttribute(view); - if (!vec->valid()) { - view = PositionDataType::getZCurveFieldName(view); - vec = _attrMgr.getAttribute(view); - } - state->_parsedLocation = std::make_unique<Location>(spec); - state->_parsedLocation->setVecGuard(std::move(vec)); - } else { - state->_parsedLocation = std::make_unique<Location>(); - if (! _request.location.empty()) { - LOG(warning, "Error parsing location string '%s': %s", - _request.location.c_str(), locationParser.getParseError()); - } - } -} - std::unique_ptr<MatchingElements> DocsumContext::fill_matching_elements(const MatchingElementsFields &fields) { diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.h b/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.h index 1624048828f..d1b656915d9 100644 --- a/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.h +++ b/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.h @@ -52,7 +52,6 @@ public: // Implements GetDocsumsStateCallback void FillSummaryFeatures(search::docsummary::GetDocsumsState * state, search::docsummary::IDocsumEnvironment * env) override; void FillRankFeatures(search::docsummary::GetDocsumsState * state, search::docsummary::IDocsumEnvironment * env) override; - void ParseLocation(search::docsummary::GetDocsumsState * state) override; std::unique_ptr<search::MatchingElements> fill_matching_elements(const search::MatchingElementsFields &fields) override; }; |