pub struct SearchOptions {
pub q: String,
pub obj_tp: Option<Vec<char>>,
pub file_id: Option<String>,
pub content_type: Option<Vec<String>>,
pub tags: Option<Vec<String>>,
pub limit: u32,
pub offset: u32,
pub visible_levels: Option<Vec<char>>,
pub viewer_id_tag: Option<String>,
pub scope_file_id: Option<String>,
pub scope_grant_file_id: Option<Box<str>>,
pub fts_cl: bool,
}Expand description
Search query options. The fields below the marker are server-derived and are never deserialized from the wire.
Fields§
§q: StringRaw user query text — the adapter sanitizes it into FTS5 syntax.
obj_tp: Option<Vec<char>>§file_id: Option<String>Restrict to one container document (its own row plus its parts).
content_type: Option<Vec<String>>AND-combined tag filter, applied inside the FTS match rather than after
it — filtering the top-limit rows afterwards would silently drop a
document that matches both the text and the tag but ranks below the cut.
limit: u32§offset: u32§visible_levels: Option<Vec<char>>Visibility levels the caller may see. None means “everything”,
including Direct (tenant owner).
viewer_id_tag: Option<String>§scope_file_id: Option<String>File-scoped token: only this file and its document tree are visible.
scope_grant_file_id: Option<Box<str>>File id a delegated (share-link / app) token was scoped to. Its own row and
the deep 'D' parts of its document tree bypass the visibility filter —
the share itself is the grant. Child 'F' rows in the same tree stay
visibility-filtered, matching GET /api/files’ document-scope branch.
fts_cl: boolQuery the contentless index instead of the external-content one. Must
match the tenant’s search.store_text setting, since a tenant’s rows live
in exactly one of the two. Hits from the contentless index carry no
snippet.