Skip to content

Instantly share code, notes, and snippets.

View nellicus's full-sized avatar

Antonio Bonuccelli nellicus

  • ClickHouse
  • Sesto Fiorentino
  • 06:55 (UTC -12:00)
  • X @nellicus
View GitHub Profile
#!/usr/bin/env perl
use POSIX;
my $KB = 1024;
my $MB = $KB*1024;
my $GB = $MB*1024;
my $TB = $GB*1024;
my %index_stats;
@radu-gheorghe
radu-gheorghe / es_bulk1
Created November 15, 2012 12:11
Elasticsearch bulk insert with index name in URL
$ cat req
{ "index" : { "_type" : "type1", "_id" : "1" } }
{ "field1" : "value1" }
{ "index" : { "_type" : "type1", "_id" : "2" } }
{ "field1" : "value2" }
$ curl -XPOST localhost:9200/testing/_bulk?pretty=true --data-binary @req
{
"took" : 5,
"items" : [ {
"index" : {
@karmi
karmi / elastic_search_ngram_analyzer_for_urls.sh
Created May 24, 2011 15:32
NGram Analyzer in ElasticSearch
# ========================================
# Testing n-gram analysis in ElasticSearch
# ========================================
curl -X DELETE localhost:9200/ngram_test
curl -X PUT localhost:9200/ngram_test -d '
{
"settings" : {
"index" : {
"analysis" : {