This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Clean the test index first | |
curl -XDELETE 'http://localhost:9200/sotest' | |
# Put Test Record | |
curl -XPUT 'http://localhost:9200/sotest/type1/1' -d '{ | |
"content":"Some content with @someone mention", | |
"mentions":["someone"], | |
"userId":"4dff31eaf8815f4df04e2d62" | |
}' | |
# Returns --> {"ok":true,"_index":"sotest","_type":"type1","_id":"1","_version":1} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XDELETE http://localhost:9200/stackoverflow | |
curl -XPUT http://localhost:9200/stackoverflow | |
curl -XPUT http://localhost:9200/stackoverflow/location/_mapping -d '{ | |
"location" : { | |
"properties": { | |
"name": { "type": "string", "boost": 2.0, "analyzer": "snowball" }, | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"ok":true,"acknowledged":true}{"ok":true,"acknowledged":true}{"ok":true,"acknowledged":true}{"ok":true,"_index":"stackoverflow","_type":"location","_id":"1","_version":1} | |
{"ok":true,"_index":"stackoverflow","_type":"location","_id":"2","_version":1} | |
{"ok":true,"_index":"stackoverflow","_type":"location","_id":"3","_version":1} | |
{ | |
"took" : 4, | |
"timed_out" : false, | |
"_shards" : { | |
"total" : 5, | |
"successful" : 5, | |
"failed" : 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
imotov-mac:tests imotov$ git clone https://github.com/elasticsearch/elasticsearch.git | |
Cloning into elasticsearch... | |
remote: Counting objects: 77061, done. | |
remote: Compressing objects: 100% (24522/24522), done. | |
remote: Total 77061 (delta 44284), reused 75308 (delta 42717) | |
Receiving objects: 100% (77061/77061), 14.42 MiB | 1.60 MiB/s, done. | |
Resolving deltas: 100% (44284/44284), done. | |
imotov-mac:tests imotov$ cd elasticsearch/ | |
imotov-mac:elasticsearch imotov$ ./gradlew test | |
:jarjar:compileJava UP-TO-DATE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Start 2 ES nodes with default settings before running this script | |
# | |
curl -XDELETE http://localhost:9200/testidx | |
curl -XPUT http://localhost:9200/testidx -d '{ | |
"settings" : { | |
"index" : { | |
"number_of_shards" : 1, | |
"number_of_replicas" : 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XGET 'http://localhost:9200/twitter/tweet/_search' -d '{ | |
"query": { | |
"query_string" : { | |
"query" : "*:*" | |
} | |
}, | |
"script_fields" : { | |
"short_message" : { | |
"script" : "msg = doc.message; msg.empty ? msg.stringValue : msg.stringValue.substring(0,min(100,msg.stringValue.length()))" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
logger: | |
gateway : DEBUG | |
index.gateway : DEBUG | |
index.shard.recovery : DEBUG | |
index.shard.service: DEBUG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.lagom.nl/lcd-test/inversion.php#invpattern | |
ioreg -lw0 | grep IODisplayEDID | sed "/[^<]*</s///" | xxd -p -r | strings -6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XPUT http://localhost:9200/twitter -d '{ | |
"settings" : { | |
"index" : { | |
"number_of_shards" : 1, | |
"number_of_replicas" : 1, | |
"analysis" : { | |
"analyzer": { | |
"default" : { | |
"type" : "snowball" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XPUT http://localhost:9200/twitter -d '{ | |
"settings" : { | |
"index" : { | |
"number_of_shards" : 1, | |
"number_of_replicas" : 1 | |
} | |
}, | |
"mappings" : { | |
"tweet" : { | |
"_source" : { "enabled" : false }, |