blob: 5610278d07ffe11cbe11bb4e6bba9651280cb57f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#pragma once
#include "search/model.hpp"
#include "search/token_range.hpp"
#include "base/string_utils.hpp"
#include <cstdint>
#include <vector>
namespace search
{
// This structure represents a part of search query interpretation -
// when to a substring of tokens [m_startToken, m_endToken) is matched
// with a set of m_features of the same m_type.
struct FeaturesLayer
{
FeaturesLayer();
void Clear();
// Non-owning ptr to a sorted vector of features.
std::vector<uint32_t> const * m_sortedFeatures;
strings::UniString m_subQuery;
TokenRange m_tokenRange;
Model::Type m_type;
// *NOTE* This field is meaningful only when m_type equals to
// SEARCH_TYPE_BUILDING.
//
// When true, m_sortedFeatures contains only features retrieved from
// search index by m_subQuery, and it's necessary for Geocoder to
// perform additional work to retrieve features matching by house
// number.
bool m_hasDelayedFeatures;
bool m_lastTokenIsPrefix;
};
string DebugPrint(FeaturesLayer const & layer);
} // namespace search
|