Skip to main content

Module primitive

Module primitive 

Source
Expand description

Primitive operators: TermOperator (Definition 3.1.1), FilterOperator (Definition 3.1.4), FacetOperator (Definition 3.1.5), ScoreOperator (Definition 3.1.6).

Structsยง

FacetOperator
Facet_f: count distinct values of a field over a source posting list (or the entire document store). The result is a posting list whose payload.fields carry _facet_field, _facet_value, _facet_count, matching the serialized UQA encoding.
FilterOperator
Filter_{f, predicate}: filter a source posting list (or the universe of documents) by applying a predicate to a field.
ScoreOperator
Score_q: apply a Scorer to every entry of a source posting list. IDF and per-document length are hoisted out of the inner loop.
SpatialWithinOperator
SpatialWithin_{f, center, distance}: return all documents whose field value lies within distance (great-circle metres) of (center_x, center_y). Brute-force scans the document store using uqa_storage::haversine_distance; spatial indexes plug in via the engine layer.
TermOperator
T(t) = PL({d in D | t in term(d, f)}).