code wiki / wiki / nx_wiki_search_wiring.nx

nx_wiki_search_wiring.nx

buildroot/runtime/wiki/nx_wiki_search_wiring.nx

20931 B471 linesdepth 11pulls 33 transitivereach 5 importersview sourcekind librarytopic wiki
docsdependenciesstructsconstsfunctions

about

nx_wiki_search_wiring.nx -- WIKI-SPECIFIC THIN WIRING for search. All search logic lives in HUB primitives; this file is glue: 1. Extract query string from URL (after '?') 2. Run the hub flow with wiki-specific theme 3. Resolve each result rowid via wiki doc store 4. HTTP-wrap with /wiki/search-style 200 response Per operator cardinal 2026-05-27: "make sure you make the onsite and offsite search reusable and not just tied to the wiki" -- this file is structurally enforced THIN per NISHI_SMALL_SHARP_COMPOSABLE_STANDARD ยง4.1 M3 + the hub<->site separation in nx_search_handler_flow. COMPOSES (only hub + wiki primitives): hub/nx_search_handler_flow (5-step pipeline) hub/nx_search_render_html (theme + inputs structs) hub/nx_search_query_parser (NxSearchQuery accessors) nx_search_onsite_engine (NxSearchResults accessors) nx_search_inverted (NxInvIndex) wiki/nx_wiki_search_render (theme constants) COMPOSED BY: wiki/nx_wiki_routes (dispatches /wiki/search here)

dependencies 9 imports · 1 importers

nx_syscalls.nx nx_search_handler_flow.nx nx_search_render_html.nx nx_search_query_parser.nx nx_search_onsite_engine.nx nx_search_inverted.nx nx_wiki_search_render.nx nx_wiki_index_builder.nx nx_wiki_bm25_search.nx nx_wiki_search_wiring.nx nx_wiki_routes.nx

imports: nx_syscalls.nxnx_search_handler_flow.nxnx_search_render_html.nxnx_search_query_parser.nxnx_search_onsite_engine.nxnx_search_inverted.nxnx_wiki_search_render.nxnx_wiki_index_builder.nxnx_wiki_bm25_search.nx

imported by: nx_wiki_routes.nx

structs

none

consts

36const NX_WSW_OK: i64 = 0
37const NX_WSW_BAD_INPUT: i64 = 2200
38const NX_WSW_QUERY_TOO_LONG: i64 = 2201
39const NX_WSW_RESOLVER_OVERFLOW: i64 = 2202
40const NX_WSW_FLOW_FAIL: i64 = 2203
43const NX_WSW_MAX_URL_LEN: i64 = 4096
44const NX_WSW_RESOLVER_BUF_CAP: i64 = 16384 // 16 KB scratch for resolved doc data
45const NX_WSW_PLACEHOLDER_TITLE_CAP: i64 = 64
46const NX_WSW_PLACEHOLDER_URL_CAP: i64 = 128
47const NX_WSW_PLACEHOLDER_BODY_CAP: i64 = 512
48const NX_WSW_RANK_CAP: i64 = 256 // BM25 ranked-result scratch cap
49const NX_WSW_RENDER_CAP: i64 = 200 // hub render hard cap (NX_SRH_MAX_RESULTS_RENDER)

functions

67func nx_wsw_resolve_docs_placeholder(flow: *NxSearchFlow,
118func nx_wsw_resolve_docs_from_store(flow: *NxSearchFlow,
169func nx_wsw_extract_query_string(url: *u8, url_n: i64,
196func nx_wiki_search_handle_v2(flow: *NxSearchFlow,
262func nx_wiki_search_handle(flow: *NxSearchFlow,
292func nx_wiki_search_handle_bm25(flow: *NxSearchFlow,
417func nx_wiki_search_handle_legacy(flow: *NxSearchFlow,