void Geocoder::MatchCategories(BaseContext & ctx, bool aroundPivot)
{
TRACE(MatchCategories);
auto features = ctx.m_features[0];
if (aroundPivot) // the target country file was filtered by the rect, but the non-target was not be filtered, then emit all the result.
{
auto const pivotFeatures =
RetrieveGeometryFeatures(m_context, m_params.m_pivot, RectId::Pivot);
ViewportFilter filter(pivotFeatures, m_preRanker.Limit() / threshold */);
features.m_features = filter.Filter(features.m_features);
features.m_exactMatchingFeatures =
features.m_exactMatchingFeatures.Intersect(features.m_features);
}
// Features have been retrieved from the search index
// using the exact (non-fuzzy) matching and intersected
// with viewport, if needed. Every such feature is relevant.
features.ForEach([&](uint32_t featureId, bool exactMatch)---------------------send all features without flitering
{
Model::Type type;
if (!GetTypeInGeocoding(ctx, featureId, type))
return;
EmitResult(ctx, {m_context->GetId(), featureId}, type, TokenRange(0, ctx.NumTokens()),
nullptr /* geoParts */, true /* allTokensUsed */, exactMatch);
});
}
This will cause a problem:when the target-country has not enough result in this rect, then will try to find other result
in other country files. but other country file not filter by rect.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too