SearchService.h header

#include <ew/app/SearchService.h>

Namespace ew::app

SearchResult struct

struct ew::app::SearchResult

One hit from a project search: the object found, a display title, a short matching snippet, and a relevance score (higher is more relevant).

Members

ew::core::ContentId ew::app::SearchResult::id

The content object that matched.

QString ew::app::SearchResult::title

The object's display title (a document title or an entity name).

QString ew::app::SearchResult::snippet

A short excerpt of the body around the first matched term.

int ew::app::SearchResult::score = 0

Relevance score; results are returned in descending score order.

SearchService class

class ew::app::SearchService

Full-text search over a project's content. It scans documents (title and body) and entities (name and field values) for the query terms, ranks title matches above body matches, and boosts titles that begin with the query. This in-memory scan is the first step; a derived FTS index can back the same interface later for large projects.

Members

ew::app::SearchService::SearchService(const ew::core::Project &project)

Searches project alone (no mounted libraries); not owned.

ew::app::SearchService::SearchService(const ew::core::Project &project, const MountedLibraries &libraries)

Searches project and every library it mounts, so results span the whole working graph (shared universes / reference libraries included). Neither is owned.

Enumerations

enum class SearchScope { Everything, Documents, Entities }

Which kinds of object a search covers (a search facet).