Home | History | Annotate | Download | only in query_parser

Lines Matching refs:snippet

5 #include "components/query_parser/snippet.h"
83 bool ComparePair1st(const Snippet::MatchPosition& a,
84 const Snippet::MatchPosition& b) {
89 // sqlite's FTS matching. BuildSnippet returns the snippet for matching
105 Snippet::MatchPositions match_positions;
119 // Compute the snippet.
120 Snippet snippet;
121 snippet.ComputeSnippet(match_positions, document);
123 // Now "highlight" all matches in the snippet with **.
125 Snippet::MatchPositions::const_iterator match;
127 for (match = snippet.matches().begin();
128 match != snippet.matches().end(); ++match) {
129 star_snippet += snippet.text().substr(pos, match->first - pos);
131 star_snippet += snippet.text().substr(match->first,
136 star_snippet += snippet.text().substr(pos);
159 // one that gets the "TM" in its snippet.
172 // the 2nd match added, the snippet goes over the size limit so that
173 // the snippet ends right before the 3rd match.
245 Snippet::MatchPositions matches;
246 Snippet::ExtractMatchPositions(data[i].offsets_string, "0", &matches);