Skip to content

Instantly share code, notes, and snippets.

curl -X DELETE localhost:9200/myindex2
curl -X PUT localhost:9200/myindex2 -d '
{
"settings" : {
"index":{
"number_of_replicas":1,
"number_of_shards":4,
"analysis":{
"analyzer":{
"index_analyzer":{
@dqduc
dqduc / ack.txt
Created February 2, 2014 05:13 — forked from jprante/ack.txt
mysql> select * from ack;
+------+---------------------+------+
| n | t | c |
+------+---------------------+------+
| 1 | 2014-01-31 23:37:00 | 6 |
| 2 | 2014-01-31 23:38:00 | 6 |
| 3 | 2014-01-31 23:39:00 | 6 |
+------+---------------------+------+
3 rows in set (0.00 sec)
curl -XDELETE 'http://localhost:9200/test'
curl -XPOST 'http://localhost:9200/test' -d '{
"settings" : {
"number_of_shards" : 1,
"number_of_replicas" : 0
},
"mappings" : {
"article" : {
"properties" : {
"title": { "type": "string", "analyzer": "standard" },

Next Steps

  • Measure time spend on index, flush, refresh, merge, query, etc. (TD - done)
  • Take hot threads snapshots under read+write, read-only, write-only (TD - done)
  • Adjust refresh time to 10s (from 1s) and see how load changes (TD)
  • Measure time of a rolling restart doing disable_flush and disable_recovery (TD)
  • Specify routing on query -- make it choose same node for each shard each time (MD)
  • GC new generation size (TD)
  • Warmers
  • measure before/after of client query time with and without warmers (MD)
##################################################################
# /etc/elasticsearch/elasticsearch.yml
#
# Base configuration for a write heavy cluster
#
# Cluster / Node Basics
cluster.name: logng
# Node can have abritrary attributes we can use for routing
##################################################################
# /etc/elasticsearch/elasticsearch.yml
#
# Base configuration for a write heavy cluster
#
# Cluster / Node Basics
cluster.name: logng
# Node can have abritrary attributes we can use for routing
@dqduc
dqduc / app.js
Last active August 29, 2015 14:11 — forked from egaumer/app.js
/*jshint globalstrict:true */
/*global angular:true */
'use strict';
angular.module('demo', [
'demo.controllers',
'demo.directives',
'elasticjs.service'
]);
#!/bin/sh
#
# a simple way to parse shell script arguments
#
# please edit and use to your hearts content
#
ENVIRONMENT="dev"
curl -XDELETE localhost:9200/myindex
curl -XPUT localhost:9200/myindex -d '
{
"settings" : {
"index":{
"number_of_replicas":0,
"number_of_shards":1,
"analysis":{
"analyzer":{
"string_lowercase":{
@dqduc
dqduc / Customer.cs
Last active August 29, 2015 14:16 — forked from ThomasArdal/Customer.cs
namespace ConsoleApplication1
{
public class Customer
{
public int Zipcode { get; set; }
}
}