To run VecSearch server and access it through browser (localhost:8080) you need to:
- have Git 2.7 or later version installed.
- have Maven 3 or later version installed.
- Java 8 or later version installed.
- have PostgreSQL 9.4 or later version installed, with database called
postgres
for thepostgres
user withpostgres
password. This is required to have SQL table with detailed (url, timestamps, etc) information about the synthetic dataset of videos. - have vector similarity DBMS called 'Vectorization' (later explained how to install).
- have VecSearch sources.
Now that the requirements above are met:
- Create a simple directory where all of the VecSearch project files will be placed. Here and further on, we show how to do this in Unix systems providing bash commands.
$ mkdir VecSearchFiles
- Place in the created directory the sources of the VecSearch, which most likely is the directory named 'VecSearch'.
$ mv -r PATH/TO/VecSearch/ /PATH/TO/VecSearchFiles/
(So far you have directory VecSearchFiles with VecSearch directory in it) 3. Go to 'VecSearchFiles' directory
$ cd VecSearchFiles
- Run the sql dump to fill the local PostgreSQL database called
postgres
with data.
$ sudo -u postgres psql postgres < /VecSearch/data/videos_dump.sql
- Now you install the 'Vectorization' DBMS locally.
$ git clone https://github.com/Sherafgan/vectorization-1.git
$ cd vectorization-1
$ mvn clean package
$ mvn install
$ cd ..//
- You then run the installed 'Vectorization' database's server in the
VecSearch
directory to have all the DB's files indexed there. And you haveVectorization
database's logs inVectorizationDBMS.log
file inVecSearch
directory, so you could see the status of the DB server and the indexing.
$ cd VecSearch
$ nohup java -jar ..//vectorization-1/similarity-database-node/target/similarity-database-node-0.0.5-SNAPSHOT.jar > VectorizationDBMS.log 2>&1 &
- To index the data to 'Vectorization' database, first you change the
pom.xml
file placed inVecSearch
directory by setting the main class fromMain
toindexing.Indexer
probably in the27
th line of thepom.xml
.
$ nano pom.xml
After changing, click Ctrl+X
, enter Y
and press Enter
.
8. Now you build the VecSearch project to have run indexing.
$ mvn clean compile assembly:single
$ java -jar target/VecSearch-0.7-SNAPSHOT-jar-with-dependencies.jar
- After indexing, now you can run the demo.
-First, in
pom.xml
file you change main class fromindexing.Indexex
back toMain
(similar steps as in7
th step). -Then, again
$ mvn clean compile assembly:single
$ nohup java -jar target/VecSearch-0.7-SNAPSHOT-jar-with-dependencies.jar > server.log 2>&1 &
After a couple of minutes (required to load Word2Vec models, etc.) the VecSearch server should be running and accessible through browser with address localhost:8080
.
(The logs of the VecSearch server is available in server.log
)