nx_facet_filter.nx
buildroot/runtime/nx_facet_filter.nx
about
nx_facet_filter.nx -- FACETED SEARCH for the onsite-search arc (closes its "facet" worklist gap). The
post-ranking faceting layer: given BM25-ranked hit doc-ids + a per-doc Dublin-Core facet schema (subject /
type / creator / date -- dc:subject, dc:type, dc:creator, dc:date), (1) FILTER the hits by selected facet
values (AND across facets) and (2) return per-facet-value COUNTS (the facet UI: "Subject: law (4), ...").
Research-driven: faceted search (the feature) + Dublin Core DCMI Terms (the facet vocabulary), both
sovereign-fetched + cited (ledger #24). Integer facet-value ids (strings interned upstream). Reusable: wire
the BM25 hits from nx_onsite_search into ff_filter/ff_count. Sovereign (nx_cc->nxasm). license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_syscalls.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 FF_NDOCS: i64 = 12 |
| 11 | const FF_NFACET: i64 = 4 // DC facets: 0=subject 1=type 2=creator 3=date |
| 12 | const FF_NOSEL: i64 = 0 - 1 // sentinel: facet not selected (no filter on it) |
functions
| 14 | func ff_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 15 | func ff_putn(v: i64) -> i64 |
| 28 | func ff_filter(hits: *i64, n: i64, vals: *i64, sel: *i64, out: *i64) -> i64 called by 1: main |
| 46 | func ff_count(hits: *i64, n: i64, vals: *i64, f: i64, counts: *i64) -> i64 called by 1: main |
| 52 | func main() -> i64 |