neighbor 0.3.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +36 -0
- data/LICENSE.txt +1 -1
- data/README.md +659 -53
- data/lib/generators/neighbor/cube_generator.rb +1 -0
- data/lib/generators/neighbor/sqlite_generator.rb +13 -0
- data/lib/generators/neighbor/templates/sqlite.rb.tt +2 -0
- data/lib/generators/neighbor/vector_generator.rb +1 -0
- data/lib/neighbor/attribute.rb +48 -0
- data/lib/neighbor/model.rb +93 -66
- data/lib/neighbor/mysql.rb +37 -0
- data/lib/neighbor/normalized_attribute.rb +21 -0
- data/lib/neighbor/postgresql.rb +43 -0
- data/lib/neighbor/railtie.rb +4 -4
- data/lib/neighbor/reranking.rb +27 -0
- data/lib/neighbor/sparse_vector.rb +79 -0
- data/lib/neighbor/sqlite.rb +28 -0
- data/lib/neighbor/type/cube.rb +24 -19
- data/lib/neighbor/type/halfvec.rb +28 -0
- data/lib/neighbor/type/mysql_vector.rb +33 -0
- data/lib/neighbor/type/sparsevec.rb +30 -0
- data/lib/neighbor/type/sqlite_int8_vector.rb +29 -0
- data/lib/neighbor/type/sqlite_vector.rb +29 -0
- data/lib/neighbor/type/vector.rb +19 -5
- data/lib/neighbor/utils.rb +201 -0
- data/lib/neighbor/version.rb +1 -1
- data/lib/neighbor.rb +16 -28
- metadata +22 -8
- data/lib/neighbor/vector.rb +0 -65
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d7036a69b1c57161eaeb11e38feee92c1d5082ddbe8907a83ac3126adf9ae56
|
4
|
+
data.tar.gz: c88e4400b75d2a87f766f7e0b7ff6c5311d9c7866d32e7c2b9aa7601f60c474f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3c4c25404fb64f324fbba70edcf06d827d3708905ed4a84404a6c9ce39f27b6890d449b285ce302e24495a666c34f0bf3050270b54ef8d283f53ebeb19e4e91
|
7
|
+
data.tar.gz: 63927a8801a88edd48f74ce85d056d7112fa526b37d473b232256b5f2d47e5254b34b25e0312afc01bfedcd6a9d7826496f208e0ab0d3f57c3307fa298b8984e
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,39 @@
|
|
1
|
+
## 0.5.0 (2024-10-07)
|
2
|
+
|
3
|
+
- Added experimental support for SQLite (sqlite-vec)
|
4
|
+
- Added experimental support for MariaDB 11.6 Vector
|
5
|
+
- Added experimental support for MySQL 9
|
6
|
+
- Changed `normalize` option to use Active Record normalization
|
7
|
+
- Fixed connection leasing for Active Record 7.2
|
8
|
+
- Dropped support for Active Record < 7
|
9
|
+
|
10
|
+
## 0.4.3 (2024-09-02)
|
11
|
+
|
12
|
+
- Added `rrf` method
|
13
|
+
|
14
|
+
## 0.4.2 (2024-08-27)
|
15
|
+
|
16
|
+
- Fixed error with `nil` values
|
17
|
+
|
18
|
+
## 0.4.1 (2024-08-26)
|
19
|
+
|
20
|
+
- Added `precision` option
|
21
|
+
- Added support for `bit` dimensions to model generator
|
22
|
+
- Fixed error with Numo arrays
|
23
|
+
|
24
|
+
## 0.4.0 (2024-06-25)
|
25
|
+
|
26
|
+
- Added support for `halfvec` and `sparsevec` types
|
27
|
+
- Added support for `taxicab`, `hamming`, and `jaccard` distances with `vector` extension
|
28
|
+
- Added deserialization for `cube` and `vector` columns without `has_neighbor`
|
29
|
+
- Added support for composite primary keys
|
30
|
+
- Changed `nearest_neighbors` to replace previous `order` scopes
|
31
|
+
- Changed `normalize` option to use `before_save` callback
|
32
|
+
- Changed dimensions and finite values checks to use Active Record validations
|
33
|
+
- Fixed issue with `nearest_neighbors` scope overriding `select` values
|
34
|
+
- Removed default attribute name
|
35
|
+
- Dropped support for Ruby < 3.1
|
36
|
+
|
1
37
|
## 0.3.2 (2023-12-12)
|
2
38
|
|
3
39
|
- Added deprecation warning for `has_neighbors` without an attribute name
|
data/LICENSE.txt
CHANGED