Repository navigation
Document native full-text search - #691
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces comprehensive documentation for the new native BM25-ranked Full-Text Search feature in Harper v5.3.0, including a new developer guide, configuration references, querying guides, and updates to existing database, REST, GraphQL, and Operations API documentation. The review feedback highlights several style and formatting improvements: separating a critical security warning into distinct sentences for better visibility, replacing the <VersionBadge> component with plain text when used mid-sentence in prose, and replacing em dashes with colons as field separators in Markdown lists.
cb1kenobi
left a comment
There was a problem hiding this comment.
Native full-text documentation is consistent on authoritative versus derived state, REST and JavaScript permission boundaries, rebuild and lag error codes, and prefix-window limits. Existing inline comments already cover VersionBadge placement, em dashes, and the learn-guide security-warning wording. Nothing remaining on the changed lines is a confirmed blocking defect.
—
Reviewed 45c1c5d
45c1c5d to
6855bed
Compare
cb1kenobi
left a comment
There was a problem hiding this comment.
The field-only FullText schema, REST versus trusted in-process permission boundary, rebuild and lag error codes, and backup or log-retention recovery guidance are consistent across the new pages and updated API references. Existing discussion already covers VersionBadge placement, em dashes, and the older learn-guide warning wording. Nothing remaining on the changed lines is a confirmed blocking defect.
—
Reviewed 6855bed
kriszyp
left a comment
There was a problem hiding this comment.
The Resource code example basically ignores all of our best practices. It should:
- Not use loadAsInstace
- Use static methods
- Don't accumulate search results in an array (memory hazard, slower latency).
And I don't know why you would need to set audit: true, that's the default.
🤖 Reviewed with Claude
|
Thanks, Kris. All four points are addressed:
The accuracy pass also tightened the audit migration path, all five readiness states, write backpressure, rebuild and replica behavior, Blob limits, and the handling of derived Tantivy files. Validation is green: formatting, typecheck, workflow tests, production docs build (411 documents), 11 focused Harper integration tests, and 96 focused Harper unit tests. Comment generated by kAIle (GPT-6 Astra) |
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-691 This preview will update automatically when you push new commits. |
|
Executable coverage for the published schema, JavaScript, REST, and Operations API examples is now in Harper PR #2915, "Test documented full-text examples". The test fixture also pins permissions, index coverage, reduced-index metadata, highlight limits, synonyms, multiple indexes, and Blob sources.\n\nComment generated by kAIle (GPT-6 Astra) |
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-691 This preview will update automatically when you push new commits. |
|
Thanks for the nudge, Ethan. The remaining inline concerns have now been checked against the current core implementation, addressed, and resolved with individual replies. The guide fixes cover audit-default wording, freshness iteration without buffering, generic describe_table layout, unsupported filter metadata, duplicate release notes, POST versus GET, highlighting, Tantivy and obsolete prerelease guidance. The final cleanup also clarifies streaming errors and count behavior and removes unrelated formatting churn. The individual and combined documentation builds pass (414 documents), as do typecheck and formatting. Fresh core verification passes 119 focused tests (two LMDB-only skips in RocksDB mode) and 21 deployed full-text/example tests without skips. Claude and Cursor completed another outside review; its paired-reference findings remain covered by Document full-text paging and configurable search limits, which this guide explicitly depends on. The older changes-requested review still needs a fresh human assessment of the updated head. Comment generated by kAIle (GPT-6) |
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-691 This preview will update automatically when you push new commits. |
|
|
||
| This custom resource accepts a structured JSON search body through POST. The category filter is optional; `q` is required. For URL-based GET searches, use the exported table endpoint in step 4. | ||
|
|
||
| Harper applies the availability and optional category conditions while accepting current product records. Existing secondary indexes can narrow candidates; rejected records do not count toward the requested page. |
There was a problem hiding this comment.
minor — "Rejected records do not count toward the requested page" has no version qualifier, but the tutorial is badged v5.3.0 and the reference says this only holds from v5.4.
| { "operation": "describe_table", "table": "Product", "database": "catalog" } | ||
| ``` | ||
|
|
||
| The response also includes the table's ordinary schema and storage metadata. The relevant full-text fragment is: |
There was a problem hiding this comment.
nit — the example labelled "relevant fragment" leaves out stop_words, surface_terms, synonyms and highlighting, and doesn't say the fields were left out.
| @@ -219,7 +253,9 @@ The response status is always `200` — `Content-Range` is informational (Harper | |||
|
|
|||
There was a problem hiding this comment.
[minor] Unavailable-totals lists full-text queries as always reporting *. Per reference/rest/querying.md:99 and reference/full-text-search/querying.md:84, that only holds with exactCount: true; otherwise the request is downgraded to count=estimated and can return a number. A client built from line 247 handles the estimate case wrong. Qualify the full-text case to "with exact counts enabled".
(reference/rest/querying.md:247 is not part of this PR's diff — anchored to the nearest line this PR's diff can hold)
|
|
||
| Source fields cannot use `@computed` or `@relationship`. Indexable source values are strings, arrays containing strings or nulls, or Blob values declared as plain text. | ||
|
|
||
| ## Structured filters |
There was a problem hiding this comment.
[nit] "Only the directive options listed above are accepted; an unknown option returns 400" sits under Structured filters. There it reads as a rule about query-condition properties. Move it under Directive options.
⊙ Problem
🤔 Scope
The engine upgrade changes persisted indexes and matching behavior. Updating the existing search references and release notes keeps the operator guidance with the feature.
Users adopting Harper v5.4 need clear paging guidance and must plan for the fulltext 0.7.0 / Tantivy 0.27.0 index rebuild, stemming changes and unsupported direct downgrade to fulltext 0.5.x.
💡 Solution
The native guide owns the upgrade checklist and recovery procedure. The included reference companion owns request/native budgets and restart requirements; API references link to those owners.
⚖️ Alternatives
Adopt the planning review’s smaller approach: one detailed upgrade runbook in the native guide, with reference links once it is present. Publish the independently correct reference companion before the guide. No new migration page, continuation API or generated contract artifact.
🔧 Changes
Paging compatibility
✅ Verification
Exact standalone reference (410 documents) and combined guide (414) builds, whole-repository formatting, typecheck and workflow tests pass. Generated upgrade/recovery anchors were checked. Core upgrade tests support the documented JSON error and rebuild behavior; no new runtime or performance qualification is claimed. Lint and all 14 example/fixture checks also pass against the retained core fixture. Fresh validation, lint, formatting, type and workflow checks pass. The preview job built successfully, then the target server returned HTTP 500 (
Unknown system error -122, write). Tracked in PR preview deploys fail on every PR: the preview host ran out of disk quota and now drops TLS connections; these runs do not establish its current root cause. The companion check waits for PR 739 to merge.Review and release scope
Claude and Composer completed full review with domain adjudication at 48d547b; closing-full is done. Final direct wording fixes and the reviewed main-merge conflicts were checked locally with a second reader, without another outside pass. Canonical convergence remains unclaimed. The docs target the planned v5.4 adoption; confirm Upgrade full-text search to Tantivy 0.27 is included before merging/releasing these docs. Harper 5.3.0/fulltext 0.3.0 remains outside the qualified procedure and is tracked in Implement full-text generation lifecycle, rebuild, eviction, backup, and status.
Historical verification and review history (through October 26)
Main integration verified October 26
Merged current main and resolved the schema-table conflict by retaining its replica-expiration controls beside the full-text audit prerequisite. Main's backup and native-addon guidance is preserved. No runtime API or dependency changed.
Standalone and exact paired-tree builds pass (414 documents), as do formatting, typecheck and workflow tests. The paging companion independently builds 410 documents. Updated core verification passes 128 focused tests (two LMDB-only skips), 32 real-native tests, source TypeScript worker loading, and 21 deployed full-text/example tests independently under npm 11. The broader core gates have failures recorded in the core PR; this is not a whole-suite-green claim.
Fresh CI: validation passes, but the preview deployment job failed after the production build, 45.4 MiB upload and origin-node deployment succeeded. Replication to the peer failed with “WebSocket was closed before the connection was established” (deployment d63d60df-c9d4-4600-b10b-116828b4ff7f). This is a deployment/peer-connection failure, not a failed MDX/build check. No replication-error bypass, retry or deployment-setting change was made. The companion status remains pending and the prior human changes-requested review remains in place.
Final Claude/Composer review and domain adjudication completed on merge commit d9f1b2e (15 rounds / nine full cumulatively), with no conflict-resolution blocker. The canonical result remains non-converged. Its configuration/default/release-note concerns are supplied by the explicitly linked paging companion, whose exact combined tree was built. Four confirmed guide findings were then corrected: local coverage does not wait for inter-node replication; replicas require the schema declaration as well as row transactions; describe_table metadata filters unreadable fields; and Table.clear() returns 501 until full-text declarations are removed. Remaining editorial placement/style nits do not change the contract.
The range wording in Document nested relationship filters and pagination agrees with this guide and the unchanged core parser. Document schema-defined sharding and regional placement also touches the schema table; retain its placement guidance and this guide's audit prerequisite when combining it. The publication dependency remains one-way: Document full-text paging and configurable search limits before this guide. It is a companion status, not a claim that branch protection makes an out-of-order merge impossible. No PR merge, auto-merge or new reviewer request was made.
Earlier verification and review history
The final guide head and paging companion merge cleanly and pass a combined 414-document production build, typecheck and formatting. Fresh unchanged-core verification passes 119 focused schema/runtime/query tests (two LMDB-only skips in RocksDB mode) and all 21 deployed full-text/example integration tests.
Comment generated by kAIle (GPT-6)
Release target: main — native full-text guide with version-qualified v5.4 paging.
Related PRs: #3680 overlaps (Upgrade full-text search to Tantivy 0.27, engine adoption), #739 overlaps (Document full-text paging and configurable search limits, publication dependency), #753 overlaps (Document schema-defined sharding and regional placement, shared schema table), #736 overlaps (Document nested relationship filters and pagination, consistent range semantics), #671 overlaps (Add production reliability guides for Harper operators, shared reference edits), #733 overlaps (docs: clarify RocksDB no-fsync durability and LMDB-only writeAsync, shared reference edits), #743 overlaps (Document the operations API source allowlist (set_network_access, get_network_access), shared reference edits), #749 overlaps (Document native concurrency controls and their consistency limits, shared reference edits), #756 overlaps (Document the seal lockdown modes and the seal-after-load default, shared reference edits), 10 others independent
Publication dependency: Document full-text paging and configurable search limits supplies configuration and 5.4 release-note owners before this native guide. The combined tree is the verified publication result. The one-way companion status waits for that PR; neither PR is a standalone replacement for the other. No merge or auto-merge is authorized.
Depends-on: #739
Complexity: medium
Review-Coverage: authored=codex; ran=claude,cursor-composer,cursor-grok; adjudicated=domain; blocked=gemini(auth); declined=cursor-kimi,cursor-muse,muse; rounds=17; full=10 @ 58456b3
Review-Attention: read ~4m (decisions: carry-739-content, inline-version-split-prose, contributing-badge-policy, auditlog-default-fixed-here) @ 58456b3