Skip to content

Commit 229cb9c

Browse files
authored
INDEX.md edits
1 parent 7d63472 commit 229cb9c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docs/reference/INDEX.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# EQL index configuration
22

33
The following functions allow you to configure indexes for encrypted columns.
4-
All these functions modify the `cs_configuration_v1` table in your database, and is added during the EQL installation.
4+
All these functions modify the `cs_configuration_v1` table in your database, and are added during the EQL installation.
55

66
> **IMPORTANT:** When you modify or add an index, you must re-encrypt data that's already been stored in the database.
77
The CipherStash encryption solution will encrypt the data based on the current state of the configuration.
@@ -24,7 +24,7 @@ SELECT cs_add_index_v1(
2424
| ------------- | -------------------------------------------------- | ------------------------------------------------------------------------ |
2525
| `table_name` | Name of target table | Required |
2626
| `column_name` | Name of target column | Required |
27-
| `index_name` | The index kind | Required. |
27+
| `index_name` | The index kind | Required |
2828
| `cast_as` | The PostgreSQL type decrypted data will be cast to | Optional. Defaults to `text` |
2929
| `opts` | Index options | Optional for `match` indexes, required for `ste_vec` indexes (see below) |
3030

@@ -44,7 +44,7 @@ Supported types:
4444

4545
A match index enables full text search across one or more text fields in queries.
4646

47-
The default Match index options are:
47+
The default match index options are:
4848

4949
```json
5050
{
@@ -93,21 +93,21 @@ Specifically, searching for strings _shorter_ than the `tokenLength` parameter w
9393

9494
If you're using n-gram as a token filter, then a token that is already shorter than the `tokenLength` parameter will be kept as-is when indexed, and so a search for that short token will match that record.
9595
However, if that same short string only appears as a part of a larger token, then it will not match that record.
96-
In general, therefore, you should try to ensure that the string you search for is at least as long as the `tokenLength` of the index, except in the specific case where you know that there are shorter tokens to match, _and_ you are explicitly OK with not returning records that have that short string as part of a larger token.
96+
Try to ensure that the string you search for is at least as long as the `tokenLength` of the index, except in the specific case where you know that there are shorter tokens to match, _and_ you are explicitly OK with not returning records that have that short string as part of a larger token.
9797

9898
#### Options for ste_vec indexes (`opts`)
9999

100100
An ste_vec index on a encrypted JSONB column enables the use of PostgreSQL's `@>` and `<@` [containment operators](https://www.postgresql.org/docs/16/functions-json.html#FUNCTIONS-JSONB-OP-TABLE).
101101

102102
An ste_vec index requires one piece of configuration: the `context` (a string) which is passed as an info string to a MAC (Message Authenticated Code).
103103
This ensures that all of the encrypted values are unique to that context.
104-
It is generally recommended to use the table and column name as a the context (e.g. `users/name`).
104+
We recommend that you use the table and column name as a the context (e.g. `users/name`).
105105

106-
Within a dataset, encrypted columns indexed using an `ste_vec` that use different contexts cannot be compared.
106+
Within a dataset, encrypted columns indexed using an `ste_vec` that use different contexts can't be compared.
107107
Containment queries that manage to mix index terms from multiple columns will never return a positive result.
108108
This is by design.
109109

110-
The index is generated from a JSONB document by first flattening the structure of the document such that a hash can be generated for each unique path prefix to a node.
110+
The index is generated from a JSONB document by first flattening the structure of the document so that a hash can be generated for each unique path prefix to a node.
111111

112112
The complete set of JSON types is supported by the indexer.
113113
Null values are ignored by the indexer.
@@ -182,7 +182,7 @@ The hashes would be generated for all prefixes of the full path to the leaf node
182182

183183
Query terms are processed in the same manner as the input document.
184184

185-
A query prior to encrypting & indexing looks like a structurally similar subset of the encrypted document, for example:
185+
A query prior to encrypting and indexing looks like a structurally similar subset of the encrypted document. For example:
186186

187187
```json
188188
{
@@ -238,4 +238,4 @@ SELECT cs_remove_index_v1(
238238
column_name text,
239239
index_name text
240240
);
241-
```
241+
```

0 commit comments

Comments
 (0)