Skip to content

voyagersearch/quickstart-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Voyager Java Quickstart

This purpose of this project is to provide simple examples of extending Voyager with Java.

JVM Requirements:

  • Voyager runs on Java 1.8+
  • The Oracle JVMs have been tested successfully. Other JVMs have are untested and their viability is unknown.
  • Check Lucene JavaBugs before deciding a deployment JVM.

System Requirements:

Getting Started

To get started, download Voyager here

This Quickstart Guide is also included in the Voyager distribution in the ${install.dir}dev/java/quickstartfolder. The default installation directory is c:\voyager\server_1.9\dev

When running these samples from the ${install.dir}/dev/java/quickstart folder, simply run:

ant

When running from elsewhere (such as a local clone of this repository) point to the Voyager install by setting the voyager.dir system property:

ant -Dvoyager.dir=c:\voyager\server_1.9

Installing in Voyager

After running ant successfully, a jar file will be created in:

build/voyager-custom-extensions.jar

Copy this file to your ${app.dir}/lib/ext folder. Alternatively you can run

ant install

This will build the extension and copy it to the configured voyager instance:

install:
     [copy] Copying 1 file to /Users/ryan/workspace/voyager/test/artifact/Voyager/app/lib/ext
     [copy] Copying /Users/ryan/workspace/quickstart-java/build/voyager-custom-extensions.jar to /Users/ryan/workspace/voyager/test/artifact/Voyager/app/lib/ext/voyager-custom-extensions.jar

BUILD SUCCESSFUL
Total time: 3 seconds

Check that your .jar file is in the ${app.dir}/lib/ext folder and restart voyager:

ext folder

After restarting voyager, your custom code will be loaded in Voyager.

See Custom Locations for how some of these extensions will appear.

Setting up Eclipse

This repository contains an Eclipse project that allows to run the samples from the Eclipse IDE.

From Eclipse:

  1. Import this directory as an existing project.

    build path build path

  2. Set up a Classpath Variable named VOYAGER_DIR that points the Voyager directory.

    build path
    variable

Quickstart Distribution

This file is included in the standard Voyager download. The version info is listed below:

Original Source: 
https://github.com/voyagersearch/quickstart-java.git
 
Date: 
@touch.time@

Version: 
https://github.com/voyagersearch/quickstart-java/commit/@githash@