Elastic

To test against ElasticSearch we can set the elastic version property like the example below which will then start Elastic as a docker container automatically.

ebean:
  test:
#    useDocker: false
#    shutdown: stop # stop | remove
    platform: h2 # h2, postgres, mysql, oracle, sqlserver, sqlite
    ddlMode: dropCreate # none | dropCreate | create | migration | createOnly | migrationDropCreate
    dbName: myapp

  docstore:
    url: http://127.0.0.1:9201
    active: true
    generateMapping: true
    dropCreate: true

    elastic:
      version: 5.6.0
      port: 9201

In terms of logging we can see:

21:57:06.587 INFO  io.ebean.docker.commands.Commands - Start container ut_elastic with port:9201

Properties

Property Description
ebean.docstore.active Set to true to enable docstore use
ebean.docstore.url URL that ElasticSearch is expected to be using
ebean.docstore.generateMapping When true generate the index mapping
ebean.docstore.dropCreate When true drop the indexes and recreate them

For more details on the ElasticSearch.