Search Classes
This page documents the search-related classes used for querying documentation in Zeal.SearchQuery
TheSearchQuery class represents a parsed search query, including docset filters and the core search term.
Header
Namespace
Constructors
SearchQuery() (default)
SearchQuery() (with parameters)
query- The core search query stringkeywords- Optional list of docset keywords to filter by
Static Methods
fromString()
: separator.
Parameters:
str- The query string to parse
:) creates a docset filter:
"android:setTypeFa"→ filters:["android"], query:"setTypeFa""java,android:setTypeFa"→ filters:["java", "android"], query:"setTypeFa"
::) is preserved in the query:
"std::string"→ filters:[], query:"std::string""c++:std::string"→ filters:["c++"], query:"std::string"
"noprefix"→ filters:[], query:"noprefix"":find"→ filters:[], query:":find"
Query Methods
toString()
isEmpty()
true if the query has no search term
query()
setQuery()
str- The query string to set
Keyword Methods
keywords()
setKeywords()
list- The list of keywords
hasKeywords()
true if keywords are present
Example:
hasKeywords() (with parameter)
keywords- List of keywords to check against
true if at least one keyword matches
Example:
keywordPrefixSize()
"python:" returns 7)
Serialization
SearchQuery supports Qt’s data stream serialization:SearchResult
TheSearchResult struct represents a single search result from a docset.
Header
Namespace
Structure
Members
name
"std::string", "list.append").
type
"Class", "Method", "Function", "Module").
urlPath
urlFragment
docset
score
matchPositions
Operators
operator<
Usage Example
Related Classes
- Docset - Individual docset class that performs searches
- DocsetRegistry - Registry that searches across multiple docsets