summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorArne Juul <arnej@verizonmedia.com>2020-07-09 18:27:00 +0000
committerArne Juul <arnej@verizonmedia.com>2020-07-15 15:39:21 +0000
commitb5462ce35a40b74a7492b62158d0e133e6d9222a (patch)
tree9e0459c1477fb97de2542291859db41bc46dabdb /searchlib
parente0e2a8105d9ee65d37af96c46e364293e7016d7a (diff)
less log spam
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/common/locationiterators.cpp16
-rw-r--r--searchlib/src/vespa/searchlib/features/distancefeature.cpp27
2 files changed, 21 insertions, 22 deletions
diff --git a/searchlib/src/vespa/searchlib/common/locationiterators.cpp b/searchlib/src/vespa/searchlib/common/locationiterators.cpp
index 5940874e5b2..5ce37a71cf4 100644
--- a/searchlib/src/vespa/searchlib/common/locationiterators.cpp
+++ b/searchlib/src/vespa/searchlib/common/locationiterators.cpp
@@ -48,7 +48,7 @@ FastS_2DZLocationIterator::~FastS_2DZLocationIterator() = default;
void
FastS_2DZLocationIterator::doSeek(uint32_t docId)
{
- LOG(info, "FastS_2DZLocationIterator: seek(%u) with numDocs=%u endId=%u",
+ LOG(debug, "FastS_2DZLocationIterator: seek(%u) with numDocs=%u endId=%u",
docId, _numDocs, getEndId());
if (__builtin_expect(docId >= _numDocs, false)) {
setAtEnd();
@@ -67,32 +67,32 @@ FastS_2DZLocationIterator::doSeek(uint32_t docId)
}
for (uint32_t i = 0; i < numValues; i++) {
int64_t docxy(pos[i]);
- LOG(info, "doc %u has docxy %zu", docId, docxy);
+ LOG(spam, "doc %u has docxy %zu", docId, docxy);
if ( ! location.getzFailBoundingBoxTest(docxy)) {
int32_t docx = 0;
int32_t docy = 0;
vespalib::geo::ZCurve::decode(docxy, &docx, &docy);
- LOG(info, "decode zcurve: docx %u, docy %u", docx, docy);
+ LOG(spam, "decode zcurve: docx %u, docy %u", docx, docy);
uint32_t dx = (location.getX() > docx)
? location.getX() - docx
: docx - location.getX();
- LOG(info, "dx : %u", dx);
+ LOG(spam, "dx : %u", dx);
if (location.getXAspect() != 0)
dx = ((uint64_t) dx * location.getXAspect()) >> 32;
- LOG(info, "d'* : %u", dx);
+ LOG(spam, "d'* : %u", dx);
uint32_t dy = (location.getY() > docy)
? location.getY() - docy
: docy - location.getY();
- LOG(info, "dy : %u", dx);
+ LOG(spam, "dy : %u", dx);
uint64_t dist2 = (uint64_t) dx * dx + (uint64_t) dy * dy;
- LOG(info, "dist^2 : %zu", dist2);
+ LOG(spam, "dist^2 : %zu", dist2);
if (dist2 <= _radius2) {
setDocId(docId);
return;
}
} else {
- LOG(info, "%u[%u] zFailBoundingBoxTest", docId, i);
+ LOG(spam, "%u[%u] zFailBoundingBoxTest", docId, i);
}
}
diff --git a/searchlib/src/vespa/searchlib/features/distancefeature.cpp b/searchlib/src/vespa/searchlib/features/distancefeature.cpp
index 13d21614a14..1fbd8527780 100644
--- a/searchlib/src/vespa/searchlib/features/distancefeature.cpp
+++ b/searchlib/src/vespa/searchlib/features/distancefeature.cpp
@@ -83,7 +83,7 @@ feature_t
DistanceExecutor::calculateDistance(uint32_t docId)
{
if ((! _locations.empty()) && (_pos != nullptr)) {
- LOG(info, "calculate 2D Z-distance from %zu locations", _locations.size());
+ LOG(debug, "calculate 2D Z-distance from %zu locations", _locations.size());
return calculate2DZDistance(docId);
}
return DEFAULT_DISTANCE;
@@ -104,19 +104,19 @@ DistanceExecutor::calculate2DZDistance(uint32_t docId)
int32_t loc_x = loc->getXPosition();
int32_t loc_y = loc->getYPosition();
uint64_t loc_a = loc->getXAspect();
- LOG(info, "location: x=%u, y=%u, aspect=%zu", loc_x, loc_y, loc_a);
+ LOG(debug, "location: x=%u, y=%u, aspect=%zu", loc_x, loc_y, loc_a);
for (uint32_t i = 0; i < numValues; ++i) {
vespalib::geo::ZCurve::decode(_intBuf[i], &docx, &docy);
uint32_t dx = (loc_x > docx) ? (loc_x - docx) : (docx - loc_x);
- LOG(info, "dx = %u", dx);
+ LOG(spam, "dx = %u", dx);
if (loc_a != 0) {
dx = (uint64_t(dx) * loc_a) >> 32;
}
- LOG(info, "dx' = %u", dx);
+ LOG(spam, "dx' = %u", dx);
uint32_t dy = (loc_y > docy) ? (loc_y - docy) : (docy - loc_y);
- LOG(info, "dy = %u", dy);
+ LOG(spam, "dy = %u", dy);
uint64_t sqdist = (uint64_t) dx * dx + (uint64_t) dy * dy;
- LOG(info, "sqdist = %zu", sqdist);
+ LOG(spam, "sqdist = %zu", sqdist);
if (sqdist < sqabsdist) {
sqabsdist = sqdist;
}
@@ -255,29 +255,28 @@ DistanceBlueprint::createExecutor(const IQueryEnvironment &env, vespalib::Stash
if (_use_item_label) {
return stash.create<ConvertRawscoreToDistance>(env, _arg_string);
}
+ // expect geo pos:
+ const search::attribute::IAttributeVector * pos = nullptr;
std::vector<const search::fef::Location *> matching_locs;
std::vector<const search::fef::Location *> other_locs;
for (auto loc_ptr : env.getAllLocations()) {
if (_use_geo_pos && loc_ptr && loc_ptr->isValid()) {
if (loc_ptr->getAttribute() == _arg_string) {
- LOG(info, "found loc from query env matching '%s'", _arg_string.c_str());
+ LOG(debug, "found loc from query env matching '%s'", _arg_string.c_str());
matching_locs.push_back(loc_ptr);
} else {
- LOG(info, "found loc(%s) from query env not matching arg(%s)",
+ LOG(debug, "found loc(%s) from query env not matching arg(%s)",
loc_ptr->getAttribute().c_str(), _arg_string.c_str());
other_locs.push_back(loc_ptr);
}
}
}
if (matching_locs.empty() && other_locs.empty()) {
- LOG(warning, "DistanceBlueprint::createExecutor no valid locations");
+ LOG(debug, "createExecutor: no valid locations");
return stash.create<DistanceExecutor>(matching_locs, nullptr);
}
- LOG(info, "DistanceBlueprint::createExecutor location.valid='%s', attribute='%s'",
- "true", _arg_string.c_str());
-
- const search::attribute::IAttributeVector * pos = nullptr;
+ LOG(debug, "createExecutor: valid location, attribute='%s'", _arg_string.c_str());
if (_use_geo_pos) {
pos = env.getAttributeContext().getAttribute(_arg_string);
@@ -295,7 +294,7 @@ DistanceBlueprint::createExecutor(const IQueryEnvironment &env, vespalib::Stash
LOG(warning, "The position attribute '%s' was not found. Will use default distance.", _arg_string.c_str());
}
}
- LOG(info, "use %s with pos=%p", matching_locs.empty() ? "other" : "matching", pos);
+ LOG(debug, "use '%s' locations with pos=%p", matching_locs.empty() ? "other" : "matching", pos);
return stash.create<DistanceExecutor>(matching_locs.empty() ? other_locs : matching_locs, pos);
}