Skip to content

Instantly share code, notes, and snippets.

View imotov's full-sized avatar

Igor Motov imotov

View GitHub Profile
@imotov
imotov / geo.sh
Last active August 29, 2015 13:56
curl -XDELETE 'localhost:9200/geotest'
echo
curl -XPOST 'localhost:9200/geotest' -d'{
"settings": {
"number_of_replicas": 0,
"number_of_shards": 1
},
"mappings": {
"doc": {
"properties": {
curl -XDELETE "localhost:9200/test-idx?pretty"
curl -XPUT "localhost:9200/test-idx?pretty" -d '{
"settings": {
"index": {
"analysis": {
"analyzer": {
"dw_docid": {
"type": "custom",
"tokenizer": "dw_docid_tokenizer",
"filter": ["dw_docid_filter"]
curl -XDELETE "localhost:9200/myindex?pretty"
curl -XPUT "localhost:9200/myindex?pretty" -d '{
"mappings" : {
"inventory" : {
"_all" : {
"auto_boost" : true
},
"properties" : {
"id" : {
"type" : "long",
# Create test index
curl -XDELETE 'http://localhost:9200/test-idx?pretty'
curl -XPUT 'http://localhost:9200/test-idx?pretty' -d '{
"settings": {
"index.number_of_shards": 10,
"index.number_of_replicas": 0
}
}'
for i in {1..100}
do
[2011-04-18 13:05:25,429][DEBUG][action.index ] [Aardwolf] [wikipedia][2], node[DWa9nNZ6TMiavl6nID7_mw], [P], s[STARTED]: Failed to execute [index {[wikipedia][page][26277], source[{"id": "26277", "revision": {"contributor": "", "id": "349471962", "text": "{{Nofootnotes|date=October 2009}}\n{{worldwide}}\n{{Property law}}\n'''Real property''' and [[personal property]] are the main classifications of [[property]] in the [[common law]]. '''Real property''' refers to [[Estate in land|land]] and the improvements made by human efforts—buildings, machinery, the acquisition of various property rights, and the like.\n'''Real property''' is also termed '''[[realty]]''', '''[[real estate]]''', and '''[[immovable property]]'''.\n\nIn countries with personal ownership of '''real property''',\n[[civil law (legal system)|civil law]] protects the status in realty markets,\nwhere [[realtors]] work in realty selling real estate.\nScottish civil law calls it ''heritable property'', and in France\nit is said
bigmac:elasticsearch-0.16.0-SNAPSHOT igor$ export ES_MIN_MEM=32m; export ES_MAX_MEM=32m; bin/elasticsearch -f
[2011-04-19 11:57:51,667][INFO ][node ] [Ms. Steed] {elasticsearch/0.16.0-SNAPSHOT/2011-04-18T15:00:52}[20290]: initializing ...
[2011-04-19 11:57:51,669][INFO ][plugins ] [Ms. Steed] loaded []
[2011-04-19 11:57:53,723][DEBUG][index.shard.recovery ] [Ms. Steed] using concurrent_streams [5], file_chunk_size [100kb], translog_size [100kb], translog_ops [1000], and compress [true]
[2011-04-19 11:57:53,726][INFO ][node ] [Ms. Steed] {elasticsearch/0.16.0-SNAPSHOT/2011-04-18T15:00:52}[20290]: initialized
[2011-04-19 11:57:53,726][INFO ][node ] [Ms. Steed] {elasticsearch/0.16.0-SNAPSHOT/2011-04-18T15:00:52}[20290]: starting ...
[2011-04-19 11:57:53,796][INFO ][transport ] [Ms. Steed] bound_address {inet[/0.0.0.0:9300]}, publish_address {inet[/192.168.10.1:9300]}
[2011-04-19 11:57:56,881][INFO ][cluster.service
bigmac:elasticsearch-0.16.0-SNAPSHOT igor$ export ES_MIN_MEM=28m; export ES_MAX_MEM=28m; bin/elasticsearch -f
[2011-04-19 21:07:18,097][INFO ][node ] [Cody Mushumanski gun Man aka: the hunter] {elasticsearch/0.16.0-SNAPSHOT/2011-04-18T15:00:52}[23323]: initializing ...
[2011-04-19 21:07:18,099][INFO ][plugins ] [Cody Mushumanski gun Man aka: the hunter] loaded []
[2011-04-19 21:07:20,129][DEBUG][index.shard.recovery ] [Cody Mushumanski gun Man aka: the hunter] using concurrent_streams [5], file_chunk_size [100kb], translog_size [100kb], translog_ops [1000], and compress [true]
[2011-04-19 21:07:20,132][INFO ][node ] [Cody Mushumanski gun Man aka: the hunter] {elasticsearch/0.16.0-SNAPSHOT/2011-04-18T15:00:52}[23323]: initialized
[2011-04-19 21:07:20,133][INFO ][node ] [Cody Mushumanski gun Man aka: the hunter] {elasticsearch/0.16.0-SNAPSHOT/2011-04-18T15:00:52}[23323]: starting ...
[2011-04-19 21:07:20,199][INFO ][transport
curl -XPUT 'http://localhost:9200/twitter/tweet/1?refresh=true' -d '{
"user": "kimchy",
"post_date": "2009-11-15T13:12:00",
"message": "Trying out elasticsearch, so far so good?"
}'
echo ""
curl -XPUT 'http://localhost:9200/twitter/tweet/2?refresh=true' -d '{
"user": "kimchy",
"post_date": "2009-11-15T14:12:12",
"message": "You know, for Search"
public interface OperationRouting {
ShardIterator indexShards(ClusterState clusterState, String index, String type, String id, @Nullable String routing) throws IndexMissingException, IndexShardMissingException;
ShardIterator deleteShards(ClusterState clusterState, String index, String type, String id, @Nullable String routing) throws IndexMissingException, IndexShardMissingException;
GroupShardsIterator broadcastDeleteShards(ClusterState clusterState, String index) throws IndexMissingException, IndexShardMissingException;
ShardIterator getShards(ClusterState clusterState, String index, String type, String id, @Nullable String routing, @Nullable String preference) throws IndexMissingException, IndexShardMissingException;
@imotov
imotov / geo_distance_test
Created June 23, 2011 21:08 — forked from mauricioalarcon/geo_distance_test
geo_distance test for ES
# Delete all pins
curl -X DELETE "http://localhost:9200/pins/pin"
# Create proper mapping
curl -XPUT 'http://localhost:9200/pins/pin/_mapping' -d '
{
"pin" : {
"properties" : {
"location" : {
"type" : "geo_point"