diff options
author | Anatoly Serdtcev <serdtcev@maps.me> | 2019-03-07 16:20:37 +0300 |
---|---|---|
committer | Anatoly Serdtcev <serdtcev@maps.me> | 2019-03-11 12:25:49 +0300 |
commit | 334baf3f3d27b4320446daefa446cff959450299 (patch) | |
tree | ff29628ccf5be69cdb7958d1fb3b73716c4ccb21 /geocoder | |
parent | 70ecaf1e1eaf53baf9da3102304a2347fc937a87 (diff) |
[geocoder] Fix for review
Diffstat (limited to 'geocoder')
-rw-r--r-- | geocoder/index.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/geocoder/index.cpp b/geocoder/index.cpp index cdd4ff2b70..e6e5f91bbd 100644 --- a/geocoder/index.cpp +++ b/geocoder/index.cpp @@ -84,13 +84,13 @@ void Index::AddStreet(DocId const & docId, Index::Doc const & doc) CHECK_EQUAL(doc.m_type, Type::Street, ()); size_t const t = static_cast<size_t>(doc.m_type); - auto isStreetSuffix = [] (std::string const & s) { + auto isStreetSynonym = [] (string const & s) { return search::IsStreetSynonym(strings::MakeUniString(s)); }; - if (all_of(begin(doc.m_address[t]), end(doc.m_address[t]), isStreetSuffix)) + if (all_of(begin(doc.m_address[t]), end(doc.m_address[t]), isStreetSynonym)) { - LOG(LDEBUG, ("Undefined proper name in tokens ", doc.m_address[t], "of street entry", + LOG(LDEBUG, ("Undefined proper name in tokens", doc.m_address[t], "of street entry", doc.m_osmId, "(", doc.m_address, ")")); if (doc.m_address[t].size() > 1) m_docIdsByTokens[MakeIndexKey(doc.m_address[t])].emplace_back(docId); @@ -101,7 +101,7 @@ void Index::AddStreet(DocId const & docId, Index::Doc const & doc) for (size_t i = 0; i < doc.m_address[t].size(); ++i) { - if (!isStreetSuffix(doc.m_address[t][i])) + if (!isStreetSynonym(doc.m_address[t][i])) continue; auto addr = doc.m_address[t]; addr.erase(addr.begin() + i); |