Skip to content

Commit

Permalink
Vector model - implementation preview (#1148)
Browse files Browse the repository at this point in the history
* feat: refactoring of schema api using a builder for types

Fixed issue 1102

* fix: SQLSCRIPT commit command with retry

Fixed issue #1097

* First version of VectorBuilder to hold parameters to build the vector index

* First implementation (not tested yet) of HnswIndex derived from an optimized for RAM implementation

* chore: removed unused properties

* feat: optimized support for arrays of numbers

They are not stored as List with dynamic type for each item, but rather as array of element of the same type. This saves much more space and it is much faster because avoid java autoboxing by using literals

* feat: first working version of importer + index.

* feat: completed 1st impl of RAM+Database HSNW Index

* feat: vector test now select a random word

* test: vector test run, removed delay and converted output into logs to see the timestamp

* First draft of create index command for vectors

* Merge branch 'main' into vector-model

* feat: implemented ArcadeDB's Index interface on HnswVectorIndex

* feat: major refactoring to support vector indexes

* test: removed initial count of words

* Fixed compilation issue

* Merge branch 'main' into vector-model

* feat: vector index now is correctly saved and loaded in/from the database

* Fixed compilation issues after merge

* Added support for Chebyshev by @gramian

* Moved ChebyshevDistance into ArcadeDB project

* fix: hnsw -> init level connections under the control of maxM0 and maxM

Applied the PR from jelmerk/hnswlib#54

* feat: added statistics to the vector demo

* integrated Word2Vec and GloVe format into the importer

#995

* fix: automatically saved the vector index upon creation

* feat: sql -> added `vectorNeighbors()` function

* fix: compilation warning

* feat: supported arrays in Types + auto create type and properties + some refactoring

* chore: refactoring with names

* chore: fixed typos

* test: fixed broken tests

* test: fixed broken test
  • Loading branch information
lvca authored Jul 3, 2023
1 parent 5364986 commit 3dabad0
Show file tree
Hide file tree
Showing 173 changed files with 10,757 additions and 6,244 deletions.
6 changes: 3 additions & 3 deletions console/src/main/java/com/arcadedb/console/Console.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import com.arcadedb.database.Document;
import com.arcadedb.database.TransactionContext;
import com.arcadedb.database.async.AsyncResultsetCallback;
import com.arcadedb.engine.PaginatedFile;
import com.arcadedb.engine.ComponentFile;
import com.arcadedb.graph.Edge;
import com.arcadedb.graph.Vertex;
import com.arcadedb.integration.misc.IntegrationUtils;
Expand Down Expand Up @@ -409,9 +409,9 @@ private void executeConnect(final String url) {

checkDatabaseIsLocked(localUrl);

PaginatedFile.MODE mode = PaginatedFile.MODE.READ_WRITE;
ComponentFile.MODE mode = ComponentFile.MODE.READ_WRITE;
if (urlParts.length > 1)
mode = PaginatedFile.MODE.valueOf(urlParts[1].toUpperCase());
mode = ComponentFile.MODE.valueOf(urlParts[1].toUpperCase());

databaseFactory = new DatabaseFactory(localUrl);
databaseProxy = databaseFactory.setAutoTransaction(true).open(mode);
Expand Down
8 changes: 6 additions & 2 deletions engine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<lz4-java.version>1.8.0</lz4-java.version>
<lucene.version>8.11.2</lucene.version>
<graalvm.version>22.3.2</graalvm.version>
<hnswlib.version>1.1.0</hnswlib.version>
</properties>

<build>
Expand Down Expand Up @@ -131,7 +132,11 @@
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.github.jelmerk</groupId>
<artifactId>hnswlib-core</artifactId>
<version>${hnswlib.version}</version>
</dependency>
<dependency>
<groupId>org.graalvm.sdk</groupId>
Expand All @@ -145,5 +150,4 @@
<scope>runtime</scope>
</dependency>
</dependencies>

</project>
Loading

0 comments on commit 3dabad0

Please sign in to comment.