Hi I'm playing with the Groovy API inside Groovy Console
@GrabResolver(name='elasticsearch',
root='http://oss.sonatype.org/content/repositories/releases/')
@GrabResolver(name='maven', root='http://repo1.maven.org/maven2/')
@Grab('org.elasticsearch:elasticsearch-client-groovy:0.10.0')
import org.elasticsearch.groovy.client.GClient
import org.elasticsearch.groovy.node.GNode
import org.elasticsearch.groovy.node.GNodeBuilder
import static org.elasticsearch.groovy.node.GNodeBuilder.*
GNodeBuilder nodeBuilder = nodeBuilder();
nodeBuilder.settings {
node {
client = true
}
cluster {
name = "elasticsearch"
}
}
GNode node = nodeBuilder.node()
node.stop().close()
I'm getting always this exception about configuration of names.txt :S
org.elasticsearch.env.FailedToResolveConfigException: Failed to
resolve config path [names.txt], tried file path [names.txt], path
file [C:\develop\Groovy-1.7.6\bin\config\names.txt], and classpath
at org.elasticsearch.env.Environment.resolveConfig(Environment.java:163)
I have running a node in localhost
curl -XGET 'http://localhost:9200/_cluster/health'
{"cluster_name":"elasticsearch","status":"yellow","timed_out":false,"number_of_nodes":1,"number_of_data_nodes":1,"active_primary_shards":5,"active_shards"
:5,"relocating_shards":0,"initializing_shards":0,"unassigned_shards":5}
hernand@UKLON-05916 ~/tomcat/bin
$ curl -XGET 'http://localhost:9200/'
{
"ok" : true,
"name" : "Solitaire",
"version" : {
"number" : "0.14.4",
"date" : "2011-01-31T21:37:39",
"snapshot_build" : false
},
.....
Any ideas what happend?
Regards
David H