elasticsearch from source to debug in the eclipse


git clone https://github.com/elasticsearch/elasticsearch.git

// start eclipse

./eclipse

// import eclasticsearch to eclipse

File->Import->Maven->Exsiting Maven Project

// and browse to elasticsearch'source folder where pom.xml is located

// run org.elasticsearch.bootstrap.Bootstrap

// to activate log setting, update logging.yml in elasticsearch/config

file: ${path.logs}/${cluster.name}.log ->file: /tmp/elasticsearch.log

es.logger.level: INFO -> es.logger.level: DEBUG

//see logs

tail -f /tmp/elasticsearch.log

// an example

curl -XPUT "http://localhost:9200/movies/movie/1" -d'
{
"title": "The Godfather",
"director": "Francis Ford Coppola",
"year": 1972
}'