nx_search_server.nx
buildroot/runtime/nx_search_server.nx
about
nx_search_server.nx -- the LIVE bits-up search site (sovereign HTTP server).
module: nishi-core.search.server
depends: nx_http_server.nx, nx_rank_fused.nx, nx_diora_data.nx, fx.nx, nx_str.nx
capability: APP_RUNNABLE (DAEMON)
Serves a real search site over our own HTTP server (no nginx/libc):
GET / -> the search page (query box)
GET /search?q=.. -> runs nx_rank_fused over the indexed corpus and returns
ranked results (facet + source tier + primary star)
The corpus is loaded at startup from nx_diora_data (the verified Diora docs --
the stand-in for crawled content); in the networked env the crawler
(nx_crawl_doc/frontier) fills the same arrays from live scraping. Ranking is
LIVE per query: tier prior + BM25 content, fused via RRF -- so a unique
low-tier page outranks a thin high-tier one. Deterministic Q16.16.
dependencies 6 imports · 0 importers
imports: fx.nxnx_str.nxnx_http_server.nxnx_rank_fused.nxnx_search_inverted.nxnx_diora_data.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 24 | const NX_SEARCH_PORT: i64 = 8787 |
functions
| 27 | func bputc(buf: *u8, pos: *i64, cap: i64, c: i64) -> i64 |
| 31 | func bput(buf: *u8, pos: *i64, cap: i64, s: *u8) -> i64 |
| 37 | func bput_i64(buf: *u8, pos: *i64, cap: i64, n: i64) -> i64 |
| 47 | func bput_q16(buf: *u8, pos: *i64, cap: i64, x: i64) -> i64 |
| 61 | func nx_facet_name(f: i64) -> *u8 called by 1: main |
| 71 | func nx_tier_name(t: i64) -> *u8 called by 1: main |
| 81 | func nx_hexval(c: i64) -> i64 called by 1: nx_extract_query |
| 90 | func nx_extract_query(req: *u8, path_off: i64, path_len: i64, out: *u8, out_cap: i64) -> i64 |
| 133 | func nx_split_terms(qbuf: *u8, qlen: i64, term_ptrs: **u8, term_lens: *i64, max: i64) -> i64 called by 1: main |
| 155 | func main() -> i64 |