Latest commit f99ebaa Sep 20, 2018

Vespa sample applications - Basic stateless Vespa application

Extends the basic-search sample applicationn with a Searcher component in Java which does query and result processing.

Please refer to developing searchers for more information.

Executable example

Check-out, compile and run:

$ git clone
$ export VESPA_SAMPLE_APPS=`pwd`/sample-apps
$ cd $VESPA_SAMPLE_APPS/basic-search-java && mvn clean package
$ docker run --detach --name vespa --hostname vespa-container --privileged \
  --volume $VESPA_SAMPLE_APPS:/vespa-sample-apps --publish 8080:8080 vespaengine/vespa

Wait for the configserver to start:

$ docker exec vespa bash -c 'curl -s --head http://localhost:19071/ApplicationStatus'

Deploy the application:

$ docker exec vespa bash -c '/opt/vespa/bin/vespa-deploy prepare /vespa-sample-apps/basic-search-java/target/ && \
  /opt/vespa/bin/vespa-deploy activate'

Wait for the application to start:

$ curl -s --head http://localhost:8080/ApplicationStatus

Test the application:

$ curl -s http://localhost:8080/search/?query=title:foo

Shutdown and remove the container:

$ docker rm -f vespa