Home | History | Annotate | Download | only in bookmarks

Lines Matching refs:match

19 // Used when finding the set of bookmarks that match a query. Each match
22 struct BookmarkIndex::Match {
27 // when we match only one term, and is filled in when we get more than one
45 BookmarkIndex::Match::nodes_begin() const {
49 BookmarkIndex::NodeSet::const_iterator BookmarkIndex::Match::nodes_end() const {
93 // We use a QueryParser to fill in match positions for us. It's not the most
127 const Match& match,
130 for (NodeSet::const_iterator i = match.nodes_begin();
131 i != match.nodes_end(); ++i) {
149 // ["thi"] will match the bookmark titled [Thinking], but since
150 // ["thi"] is quoted we don't want to do a prefix match.
166 // Term is too short for prefix match, compare using exact match.
171 Match match;
172 match.terms.push_back(i);
173 matches->push_back(match);
178 // This is the first term and we're doing a prefix match. Loop through
183 Match match;
184 match.terms.push_back(i);
185 matches->push_back(match);
189 // Prefix match and not the first term. Loop through index combining
206 Match* match = &((*matches)[i]);
208 std::set_intersection(match->nodes_begin(), match->nodes_end(),
214 match->terms.push_back(index_i);
215 match->nodes.swap(intersection);
225 const Match& match = current_matches[i];
227 std::set_intersection(match.nodes_begin(), match.nodes_end(),
231 result->push_back(Match());
232 Match& combined_match = result->back();
233 combined_match.terms = match.terms;