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
Copy file name to clipboardExpand all lines: docs/developers/applications/defining-schemas.md
+45-1Lines changed: 45 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -171,7 +171,51 @@ The `@primaryKey` directive specifies that an attribute is the primary key for a
171
171
172
172
#### `@indexed`
173
173
174
-
The `@indexed` directivespecifiesthatanattributeshouldbeindexed. Thisisnecessaryifyouwanttoexecutequeriesusingthisattribute (whether that is through RESTful query parameters, SQL, or NoSQL operations).
174
+
The `@indexed` directivespecifiesthatanattributeshouldbeindexed. Whenanattributeisindexed, Harperwillcreatesecondaryindexfromthedatainthisfieldforfast/efficientqueryingusingthisfield. Thisisnecessaryifyouwanttoexecutequeriesusingthisattribute (whether that is through RESTful query parameters, SQL, or NoSQL operations).
175
+
176
+
Astandardindexwillindexthevaluesineachfield, soyoucanquerydirectlybythosevalues. Ifthefield'svalueisanarray, eachofthevaluesinthearraywillbeindexed (you can query by any individual value).
177
+
178
+
#### Vector Indexing
179
+
180
+
The `@indexed` directivecanalsospecifya `type`. Tousevectorindexing, youcanspecifythe `type` as `HNSW` forHierarchicalNavigableSmallWorldindexing. Thiswillcreateavectorindexfortheattribute. Forexample:
HNSW supports several additional arguments to the `@indexed` directive to adjust the HNSW parameters:
205
+
*`distance` - Define the distance function. This can be set to 'euclidean' or 'cosine' (uses negative of cosine similarity). The default is cosine.
206
+
*`efConstruction` - Maximum number of nodes to keep in the list for finding nearest neighbors. A higher value can yield better recall, and a lower value can have better performance. If `efSearchConstruction` is set, this is only applied to indexing. The default is 100.
207
+
*`M` - The preferred number of connections at each layer in the HNSW graph. A higher number uses more space but can be helpful when the intrinsic dimensionality of the data is higher. A lower number can be more efficient. The default is 16.
208
+
*`optimizeRouting` - This uses a heuristic to avoid graph connections that match existing indirect connections (connections through another node). This can yield more efficient graph traversals for the same M setting. This is a number between 0 and 1 and a higher value will more aggressively omit connections with alternate paths. Setting this to 0 will disable route optimizing and follow the traditional HNSW algorithm for creating connections. The default is 0.5.
209
+
*`mL` - The normalization factor for level generation, by default this is computed from `M`.
210
+
*`efSearchConstruction` - Maximum number of nodes to keep in the list for finding nearest neighbors for searching. The default is 50.
Copy file name to clipboardExpand all lines: docs/technical-details/release-notes/4.tucker/4.6.0.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
6/13/2025
6
6
7
7
### Vector Indexing: Hierarchical Navigable Small World
8
-
Harper 4.6 now includes support for vector indexing, which allows for efficient and fast queries on large semantic data sets. Vector indexing is powered by the [Hierarchical Navigable Small World (HNSW) algorithm](https://arxiv.org/abs/1603.09320) and can be used to index any vector-valued property, and is particularly useful for vector text-embedding data. HNSW is a preferred algorithm for vector indexing and searching because it provides an excellent balance of recall and performance.
8
+
Harper 4.6 now includes support for vector indexing, which allows for efficient and fast queries on large semantic data sets. Vector indexing is powered by the [Hierarchical Navigable Small World (HNSW) algorithm](https://arxiv.org/abs/1603.09320) and can be used to index any vector-valued property, and is particularly useful for vector text-embedding data. This provides powerful efficient vector-based searching for semantic and AI-based querying functionality. HNSW is a preferred algorithm for vector indexing and searching because it provides an excellent balance of recall and performance.
9
9
10
10
### New Extension API with support for dynamic reloading
11
11
4.6 introduces a new extension API with significant ergonomic improvements for creating new extension components that are more robust and dynamic. The new API also provides a mechanism for dynamic reloading of some files and configuration without restarts.
@@ -21,4 +21,3 @@ An important change is that logging to standard out/error will _not_ include the
21
21
22
22
### Resource API Upgrades
23
23
4.6 includes an upgraded form of the Resource API that can be selected with significant improvements in ease of use.
0 commit comments