- Java 11
- Maven
- Redis
cd into the root of the project directory and run the following command to compile and output the Jar file:
cd <folder name>
mvn packageThe output should be in the target folder.
Generation
The document should follow the structure below:
id1 keyword1,keyword2,...
id2 keyword3,keyword4,...
Run the following command to create new encrypted database
cd target
java -cp "libs/*:ACE-1.0-SNAPSHOT.jar" org.ace.core.generator.Generator update /path/to/document.txt newEnsure that Redis is running before executing the above command
Update
To add new records into the database, run the following command:
cd target
java -cp "libs/*:ACE-1.0-SNAPSHOT.jar" org.ace.core.generator.Generator update /path/to/new_document.txtSearch
To search for a keyword, run the following command:
cd target
java -cp "libs/*:ACE-1.0-SNAPSHOT.jar" org.ace.core.client.Client keyword_to_searchDelete
To delete an ID, run the the following command:
cd target
java -cp "libs/*:ACE-1.0-SNAPSHOT.jar" org.ace.core.generator.Generator delete ID_to_delete