nx_search_crawl_server.nx
buildroot/runtime/nx_search_crawl_server.nx
about
nx_search_crawl_server.nx -- LIVE search site over CRAWLED content.
module: nishi-core.search.crawl_server
depends: nx_http_server, nx_http_client, nx_html_to_text, nx_simhash,
nx_rank_fused, fx, nx_str
capability: APP_RUNNABLE (DAEMON)
The integrated end-state: at startup the daemon CRAWLS a seed list over our
own HTTP client (fetch -> extract text -> content-dedup -> index), then
serves a live search site that ranks the SCRAPED corpus per query
(nx_rank_fused: tier + BM25 content via RRF). Everything is surfaced by
relevance -- no category censorship, no provenance weighting (operator
decision 2026-05-29: maximal coverage). Demonstrated on loopback against
nx_mock_web; in the networked env the seeds are real URLs over DNS/TLS/HTTP.
dependencies 7 imports · 0 importers
imports: fx.nxnx_str.nxnx_http_server.nxnx_http_client.nxnx_html_to_text.nxnx_simhash.nxnx_rank_fused.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_SCS_PORT: i64 = 8790 |
| 25 | const NX_SCS_CRAWL_PORT: i64 = 8088 // the mock-web (or any seed host) |
functions
| 27 | func bputc(buf: *u8, pos: *i64, cap: i64, c: i64) -> i64 { if pos[0] < cap { buf[pos[0]] = c; pos[0] = pos[0] + 1 } return 0 } called by 1: bput |
| 28 | func bput(buf: *u8, pos: *i64, cap: i64, s: *u8) -> i64 { let n: i64 = nx_str_len(s); var i: i64 = 0; while i < n { bputc(buf, pos, cap, s[i] as i64); i = i + 1 } return 0 } |
| 30 | func nx_body_off(resp: *u8, n: i64) -> i64 called by 1: main |
| 40 | func nx_extract_title(html: *u8, n: i64, out: *u8, outcap: i64) -> i64 called by 1: main |
| 65 | func nx_extract_query(req: *u8, path_off: i64, path_len: i64, out: *u8, out_cap: i64) -> i64 |
| 92 | func nx_split_terms(qbuf: *u8, qlen: i64, tp: **u8, tl: *i64, max: i64) -> i64 |
| 107 | func main() -> i64 |