Skip to content

Instantly share code, notes, and snippets.

View luizgpsantos's full-sized avatar
😁

Luiz Santos luizgpsantos

😁
View GitHub Profile
@luizgpsantos
luizgpsantos / new relic logs
Created January 7, 2015 16:36
Elasticsearch nre relic plugin logs
[2015-01-07 14:34:46,411][TRACE][org.elasticsearch.service.newrelic.NewRelicReporter] * elasticsearch.dev.node.filtercache.memorySizeInBytes: 0.0
[2015-01-07 14:34:46,412][TRACE][org.elasticsearch.service.newrelic.NewRelicReporter] * elasticsearch.dev.node.filtercache.evictions: 0.0
[2015-01-07 14:34:46,412][TRACE][org.elasticsearch.service.newrelic.NewRelicReporter] * elasticsearch.dev.node.idcache.memorySizeInBytes: 0.0
[2015-01-07 14:34:46,412][TRACE][org.elasticsearch.service.newrelic.NewRelicReporter] * elasticsearch.dev.node.docs.count: 1.0
[2015-01-07 14:34:46,412][TRACE][org.elasticsearch.service.newrelic.NewRelicReporter] * elasticsearch.dev.node.docs.deleted: 0.0
[2015-01-07 14:34:46,413][TRACE][org.elasticsearch.service.newrelic.NewRelicReporter] * elasticsearch.dev.node.flush.total: 0.0
[2015-01-07 14:34:46,413][TRACE][org.elasticsearch.service.newrelic.NewRelicReporter] * elasticsearch.dev.node.flush.totalTimeInMillis: 0.0
[2015-01-07 14:34:46,413][TRACE][org.elasticsearch.service.newrelic
curl -XPOST "http://localhost:9200/index_name" -d'
{
"mappings": {
"your_type": {
"properties": {
"colours": {
"type": "string",
"index": "not_analyzed"
}
}
echo "Delete document"
curl -XDELETE 'http://localhost:8888/'
echo ""
echo "\nInitial search"
curl -XGET 'http://localhost:8888/'
echo ""
echo "\nCreate document"
curl -XPUT 'http://localhost:8888/'
package test;
import java.io.IOException;
import java.util.Collections;
import java.util.Map;
import org.apache.http.HttpEntity;
import org.apache.http.HttpHost;
import org.apache.http.entity.ContentType;
import org.apache.http.nio.entity.NStringEntity;
@luizgpsantos
luizgpsantos / ElasticsearchExample.java
Last active December 8, 2017 13:54
Java Transport Client
package test;
import java.io.IOException;
import java.util.Collections;
import java.util.Map;
import org.apache.http.HttpEntity;
import org.apache.http.HttpHost;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials;

Keybase proof

I hereby claim:

  • I am luizgpsantos on github.
  • I am luizgpsantos (https://keybase.io/luizgpsantos) on keybase.
  • I have a public key ASCJGrdw4Sbh_e26BeRBFybp61FJH-om-0Ppx98OfexaGAo

To claim this, I am signing this object: