You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 05e64b2
Browse filesBrowse the repository at this point in the historyBrowse files
docs(stack-encrypt): ADR-0009 orders text, with no hedge
Text ordering is decided: the order key is the system ADR-0002's text fold, which vitaminc 0.6 ships in vitaminc-ore, and the ORE and OPE indexes answer the orderings on text over it. The ADR no longer says "if the catalog keeps text ordering" or that the paragraph goes if text ordering is dropped, and decision 7 names text beside the integer types.
Copy file name to clipboardExpand all lines: packages/stack-encrypt/docs/adr/0009-operators-select-the-index-and-a-query-term-is-not-the-stored-term.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -263,8 +263,7 @@ pub trait Ranked: QueryTerm {
263
263
264
264
- A term that implements `QueryTerm` only is **exact**. The server's answer
265
265
is the answer. HMAC `Eq`, ORE and OPE (`Lt`, `Between`) on numbers, JSON
266
-
`AtPath<Eq>`, and ORE and OPE on text if the catalog keeps text ordering
267
-
(see "Text ordering" below).
266
+
`AtPath<Eq>`, and ORE and OPE on text (see "Text ordering" below).
268
267
- A `Probabilistic` term can return **false positives and no false
269
268
negatives**. `verify` is the operator's own meaning, run on a decrypted
270
269
value: it decides whether a row the server returned is a real match. Bloom
@@ -501,10 +500,11 @@ key tie; that is what the column declared, and an earlier draft of this ADR
501
500
was wrong to call it a false positive and put the term under `Probabilistic`.
502
501
Its use is ordering and cursor paging on names (`ORDER BY name`, "the page
503
502
after Nguyen"), and EQL v4 carries `query_text_ord` and `query_text_ord_ore`
504
-
for it. Whether the Rust library produces the term is a catalog question
505
-
(`TextOrdOre` is unproducible today, pending the system ADR-0002); nothing
506
-
else in this ADR depends on it, and if text ordering is dropped this paragraph
507
-
goes with it.
503
+
for it. Stack Encrypt produces the term: the order key is vitaminc-ore's
504
+
text order encoding, the system ADR-0002's fold pinned to Unicode 16, which
505
+
vitaminc 0.6 ships, and the ORE and OPE indexes answer the orderings on text
506
+
over it. `TextOrdOre` and `TextSearchOre` also need the block ORE scheme EQL
507
+
stores (#1132).
508
508
509
509
A `Ranked` term's `target_limit` applies the index's configured recall
510
510
factor and needs no `Stats`.
@@ -576,8 +576,9 @@ ciphertexts, once block ORE lands), inclusive at both ends, and the client
576
576
refuses `lo > hi` (`TermError::InvertedRange`) before either term is
577
577
derived; `(v, v)` is one value. One call derives both bounds, under one
578
578
context, so a caller cannot pair a bound from one column with a bound from
579
-
another. The ordering operators are answered over the integer types
580
-
(`op::Ordered`), by the ORE index by default and by OPE through `.via(Ope)`.
579
+
another. The ordering operators are answered over the integer types and
580
+
text (`op::Ordered`), by the ORE index by default and by OPE through
581
+
`.via(Ope)`.
581
582
582
583
In SQL the term stays one operand. EQL v4 gains a function that takes the
583
584
column and the range, and a range query domain beside each ordered query
@@ -696,8 +697,8 @@ JSON column's query already selects it. A similarity index stores its vector
696
697
separately, so a `Nearest` query must select the embedding, or the sketch,
697
698
as well.
698
699
699
-
Text ordering, if the catalog keeps it, needs no special case: `Lt` on text
700
-
is an exact term over the order key, and what that key folds is the system
700
+
Text orderingneeds no special case: `Lt` on text is an exact term over the
701
+
order key, and what that key folds is the system
701
702
ADR-0002's decision (the value model, linked above), which keeps equality off
702
703
the order term for the same reason.
703
704
@@ -877,8 +878,7 @@ let rows: Vec<UserRow> = sqlx::query_as(
877
878
.fetch_all(&pool).await?;
878
879
```
879
880
880
-
`AtPath<Lt>` on a text leaf, if the catalog keeps text ordering, is exact,
881
-
as `Lt` on a text column would be: the leaf's order term compares order
881
+
`AtPath<Lt>` on a text leaf is exact, as `Lt` on a text column is: the leaf's order term compares order
882
882
keys, and there is nothing to verify.
883
883
884
884
**`Nearest`, ranked.** Stack Similarity has no EQL spelling yet, so this is
0 commit comments