[search] ScopedMarkTokens before emit unclassified result.

This commit is contained in:
tatiana-yan 2019-09-30 15:16:45 +03:00 committed by mpimenov
parent 7d978fa8f2
commit 343d03e251

View file

@ -1510,7 +1510,9 @@ void Geocoder::MatchUnclassified(BaseContext & ctx, size_t curToken)
return;
if (type == Model::TYPE_UNCLASSIFIED)
{
EmitResult(ctx, m_context->GetId(), featureId, type, TokenRange(startToken, curToken),
auto const tokenRange = TokenRange(startToken, curToken);
ScopedMarkTokens mark(ctx.m_tokens, BaseContext::TOKEN_TYPE_UNCLASSIFIED, tokenRange);
EmitResult(ctx, m_context->GetId(), featureId, type, tokenRange,
nullptr /* geoParts */, true /* allTokensUsed */, exactMatch);
}
};