danielberkompas/elasticsearch-elixir

Failed to run cli app

madhu72 opened this issue · 1 comments

** (ArgumentError) argument error
(stdlib 3.8) :ets.lookup(Util.ElasticsearchCluster.Config, :config)
(elasticsearch 1.0.1) lib/elasticsearch/cluster/cluster.ex:218: Elasticsearch.Cluster.read_config/1
(elasticsearch 1.0.1) lib/elasticsearch.ex:286: Elasticsearch.put/4
(util 0.1.0) lib/cli.ex:6: Util.CLI.main/1
(elixir 1.11.3) lib/kernel/cli.ex:124: anonymous fn/3 in Kernel.CLI.exec_fun/2

---config.exs

use Mix.Config

config :util, Util.ElasticsearchCluster,
url: "http://localhost:9200"

You need to add your cluster to your supervision tree in application.ex, like the README says.

children = [
  Util.ElasticsearchCluster
]