Displaying 1 result from an estimated 1 matches for "snippet_generator".
2015 Jul 26
1
Get term from document by position
...\n\n";
// Find the top 10 results for the query.
enquire.set_query(query);
Xapian::MSet matches = enquire.get_mset(0, 10);
// Display the results.
std::cout << matches.get_matches_estimated() << " results found.\n";
Xapian::Snipper snippet_generator;
snippet_generator.set_stemmer(stemmer);
snippet_generator.set_mset(matches);
std::string snippet=snippet_generator.generate_snippet(text_to_index.text_str);
std::cout << "\n###################################################\n";
std::cout << "snippet:...