code wiki / _hdl_build / nx_book_search_lib.nx
nx_book_search_lib.nx
buildroot/runtime/_hdl_build/nx_book_search_lib.nx
about
nx_book_search_lib.nx -- shared SC20 library-search CORE (NO main). Wired into nx_media_server /api/search.
Multi-term, case-insensitive, BM25-ranked TOP-N over a newline-delimited index file (idx_book.wsl).
Reuses nx_bm25 (bm_idf_micro/bm_sat_milli/bm_token_count/bm_df) + nx_research_extract (re_count). Same proven
algorithm as the gated nx_book_search, extended to multi-term + top-N. license_tier: ORIGINAL
dependencies 3 imports · 1 importers
imports: nx_research_extract.nxnx_bm25.nxnx_syscalls.nx
imported by: nx_media_server.nx
structs
| none |
consts
| 8 | const K_MAGIC_300000: i64 = 300000 |
| 9 | const K_MAGIC_1024: i64 = 1024 |
functions
| 11 | func bks_lc(c: i64) -> i64 { if c >= 65 { if c <= 90 { return c + 32 } } return c } called by 1: bks_search |
| 16 | func bks_search(idxpath: *u8, query: *u8, res_off: *i64, res_len: *i64, res_score: *i64, maxn: i64, cnt: *i64) -> i64 |