Rhys Bradbury Rhys Bradbury - 1 month ago 22
Scala Question

What is `path.home` variable and how do I set it?

I have been using the

elasticsearch
driver.

When attempting to create a client:

import com.sksamuel.elastic4s._
import org.elasticsearch.common.settings._

val esSettings = //...
val client = ElasticClient local esSettings


I recieve a runtime error:

[IllegalStateException: path.home is not configured]


What is
path.home
?

how do I set
path.home
?

Versions:
elasticsearch-2.4.1
,
elastic4s-2.3.1

Answer

What is path.home?

As you can see from the documentation, path.home is a variable which must be set to define where on the hard disk to store data.

How do I set path.home?

After searching/trial and error, I have found that path.home cannot be set in elasticsearch.yml (as indicated in the documentation). This will cause your elasticsearch service to fail when you try load that new config.

path.home is a JVM arg.

specifically -Des.path.home="~/folder/"