Difference between revisions of "Libzim"
Jump to navigation
Jump to search
Line 94: | Line 94: | ||
</source> | </source> | ||
=== | == using the Search-class == | ||
The class ''zim::Search'' adds 2 search features to zimlib. Both fill a result object of type zim::Search::Results. This result object is actually a ''std::vector'' of a ''zim::SearchResult''. The ''zim::SearchResult'' holds a article and a priority. Since copying large result sets is quite expensive, all search methods of this expects a reference to a existing ''zim::Search::Results'', which is filled. | |||
The simpler searches articles by title either by a praefix or by a range of titles. You pass a namespace and either a single ''std::string'' and you get all articles, whose title starts with that string or you pass two strings and you get all articles whose title is between these strings (including the passed strings). |