Skip to content

Expose full-text conditions and $score through Table.search and REST #2511

Closed

Description

@kylebernhardy

Outcome

Integrate full-text search into Harper's existing query mechanisms rather than adding a parallel search API.

Acceptance criteria

  • matches, matches_all, matches_phrase, matches_prefix, matches_fuzzy, and fuzzy-prefix compile from the existing condition tree.
  • Bounded same-index Boolean groups and supported structured AND conditions are planned correctly. Cross-index, relationship, unanchored negative, and unsupported ordering shapes fail before native execution.
  • $score and opt-in $highlights are available for projection without becoming stored attributes.
  • REST query translation and Table.search() produce equivalent results and errors; raw Tantivy syntax is never exposed.
  • Native candidate IDs are resolved to current Harper records. Indexed/current versions, structured predicates, and bounded refill are checked before return.
  • Table and attribute authorization applies to searchable fields, predicates, returned records, and highlights. Restricted-field membership cannot become an oracle.
  • Filtering does not alter BM25 scores. Pagination and tie-breaking are deterministic within a local ready generation without promising cross-node snapshots.
  • Product autocomplete uses prefix or fuzzy-prefix against the product index. Curated suggestions remain a normal customer-managed table with its own @fullText declaration.
  • Query parity, permissions, stale candidates, refill, pagination, highlights, unsupported shapes, and REST status mapping are covered by integrated tests.

Delivery

Complete native full-text indexing and search #2855 delivers this surface on top of Activate native full-text indexes with shared lifecycle coordination #2616.

Comment generated by kAIle (GPT-6 Astra)

Metadata

Metadata

Assignees

Labels

area:rest-apiREST API, resources, routingarea:searchVector search, HNSW, full-text search

Type

Fields

Priority

P3

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions