summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArne Juul <arnej@verizonmedia.com>2020-07-14 08:45:12 +0000
committerArne Juul <arnej@verizonmedia.com>2020-07-15 15:39:23 +0000
commite4f9b819485bcdbd4a0f103268a65004b58650e0 (patch)
treeddf6fa28af313623398e7535a118533751f9d980
parent2de929825f7c0f5e181ef226c2c9d63b127a403f (diff)
fix TODOs
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/resolveviewvisitor.cpp2
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/docsumstate.cpp20
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/positionsdfw.cpp2
3 files changed, 14 insertions, 10 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/matching/resolveviewvisitor.cpp b/searchcore/src/vespa/searchcore/proton/matching/resolveviewvisitor.cpp
index f467e9dd9d1..b12b48465d9 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/resolveviewvisitor.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/resolveviewvisitor.cpp
@@ -18,7 +18,7 @@ ResolveViewVisitor::visit(ProtonLocationTerm &n) {
auto newView = document::PositionDataType::getZCurveFieldName(oldView);
n.setView(newView);
n.resolve(_resolver, _indexEnv);
- LOG(info, "ProtonLocationTerm found %zu field after view change %s -> %s",
+ LOG(debug, "ProtonLocationTerm found %zu field after view change %s -> %s",
n.numFields(), oldView.c_str(), newView.c_str());
}
}
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsumstate.cpp b/searchsummary/src/vespa/searchsummary/docsummary/docsumstate.cpp
index c42d4d9924d..42afadb386a 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/docsumstate.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/docsumstate.cpp
@@ -2,6 +2,7 @@
#include "docsumstate.h"
#include <vespa/juniper/rpinterface.h>
+#include <vespa/document/datatype/positiondatatype.h>
#include <vespa/searchcommon/attribute/iattributecontext.h>
#include <vespa/searchlib/common/geo_location.h>
#include <vespa/searchlib/common/geo_location_parser.h>
@@ -68,13 +69,14 @@ GetDocsumsState::get_matching_elements(const MatchingElementsFields &matching_el
void
GetDocsumsState::parse_locations()
{
+ using document::PositionDataType;
assert(_parsedLocations.empty()); // only allowed to call this once
if (! _args.getLocation().empty()) {
- search::common::GeoLocationParser locationParser;
- if (locationParser.parseOldFormatWithField(_args.getLocation())) {
- // TODO: do we need to add _zcurve prefix?
- auto attr_name = locationParser.getFieldName();
- search::common::GeoLocationSpec spec{attr_name, locationParser.getGeoLocation()};
+ search::common::GeoLocationParser parser;
+ if (parser.parseOldFormatWithField(_args.getLocation())) {
+ auto view = parser.getFieldName();
+ auto attr_name = PositionDataType::getZCurveFieldName(view);
+ search::common::GeoLocationSpec spec{attr_name, parser.getGeoLocation()};
_parsedLocations.push_back(spec);
} else {
LOG(warning, "could not parse location string '%s' from request",
@@ -88,10 +90,10 @@ GetDocsumsState::parse_locations()
if (iterator.getType() == search::ParseItem::ITEM_GEO_LOCATION_TERM) {
vespalib::string view = iterator.getIndexName();
vespalib::string term = iterator.getTerm();
- search::common::GeoLocationParser locationParser;
- if (locationParser.parseOldFormat(term)) {
- // TODO: do we need to add _zcurve prefix?
- search::common::GeoLocationSpec spec{view, locationParser.getGeoLocation()};
+ search::common::GeoLocationParser parser;
+ if (parser.parseOldFormat(term)) {
+ auto attr_name = PositionDataType::getZCurveFieldName(view);
+ search::common::GeoLocationSpec spec{attr_name, parser.getGeoLocation()};
_parsedLocations.push_back(spec);
} else {
LOG(warning, "could not parse location string '%s' from stack dump",
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/positionsdfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/positionsdfw.cpp
index 50e1015aa37..182229b3647 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/positionsdfw.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/positionsdfw.cpp
@@ -34,6 +34,8 @@ LocationAttrDFW::getAllLocations(GetDocsumsState *state)
}
for (const auto & loc : state->_parsedLocations) {
if (loc.location.valid()) {
+ LOG(debug, "found location(field %s) for DFW(field %s)\n",
+ loc.field_name.c_str(), getAttributeName().c_str());
if (getAttributeName() == loc.field_name) {
retval.matching.push_back(&loc.location);
} else {