code wiki / _hdl_build / nx_search_federated.nx
nx_search_federated.nx
buildroot/runtime/_hdl_build/nx_search_federated.nx
about
nx_search_federated.nx -- FEDERATED QUERY across every Nishi index, driven by the search-sources MANIFEST.
This is the integration CONSUMER: it reads knowledge/index/search_sources.txt (the contract written by
nx_search_register) and queries EVERY listed index -- the ecosystem library index AND the researcher's growing
shards AND any future index -- through one interface. It has NO hardcoded index paths and NO knowledge of
"researcher" vs "library": it just queries whatever the manifest lists. Adding a new index source needs ZERO
change here = loose coupling. Merges candidates across sources, ranks by #query-terms-matched, prints top-K
`score [label] path`. Usage: nx_search_federated <term> [term ...] expect_exit: 0 license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_search_inverted_persist.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
| 10 | const FS_TERMS: i64 = 8 |
| 11 | const FS_ROWIDS: i64 = 4096 |
| 12 | const FS_CAND: i64 = 32768 |
| 13 | const FS_TOPK: i64 = 15 |
| 14 | const FS_SRC: i64 = 8192 |
functions
| 16 | func fs_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } called by 1: main |
| 17 | func fs_num(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1} sys_write(1,bb,k); return 0 } called by 1: main |
| 18 | func fs_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: main |
| 21 | func fs_scan(buf: *u8, i: i64, end: i64) -> i64 called by 1: main |
| 28 | func fs_load_docmap(path: *u8, paths_out: *i64, cap: i64) -> i64 |
| 45 | func main(argc: i64, argv: *i64) -> i64 |