FindMyFiles
FindMyFiles.ViewModels
FocusedQueryRewriter Class
Focused search: a pure query rewrite in the UI layer —
the engine is never touched (ADR-0019). Every top-level OR group of the
user's query gets the configured noise-path exclusions (!path:"…")
and the extension whitelist (one ext:a;b;… term) appended, except
where the user already expressed intent: a group mentioning
ext:/regex: keeps its own type filter, a group mentioning
path: or containing \ keeps its own location.
public static class FocusedQueryRewriter
Inheritance System.Object → FocusedQueryRewriter
Methods
FocusedQueryRewriter.Compose(string, IReadOnlyList<string>, IReadOnlyList<string>) Method
Rewrites userQuery for focused mode. An empty/whitespace query is returned unchanged — the "no query, no results" rule stays the orchestrator's, and a rewrite must never turn an empty query into a non-empty one.
public static string Compose(string userQuery, System.Collections.Generic.IReadOnlyList<string> excludePaths, System.Collections.Generic.IReadOnlyList<string> extensions);
Parameters
userQuery System.String
The user's raw query text.
excludePaths System.Collections.Generic.IReadOnlyList<System.String>
Noise paths appended as !path:"…" exclusions.
extensions System.Collections.Generic.IReadOnlyList<System.String>
The extension whitelist appended as one ext: term.
Returns
System.String
The rewritten query, or the input unchanged when empty or already constrained.