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 }, |
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.type: com.sonian.elasticsearch.http.jetty.JettyHttpServerTransportModule |
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 'http://localhost:9200/testas/_analyze?field=name&text=Skani+varškė' && echo | |
šė{"tokens":[{"token":"skani","start_offset":0,"end_offset":5,"type":"<ALPHANUM>","position":1},{"token":"varškė","start_offset":6,"end_offset":12,"type":"<ALPHANUM>","position":2}]} | |
$ curl 'http://localhost:9200/testas/_analyze?field=name&text=varškė' && echo | |
šė{"tokens":[{"token":"varᅤᄀkᅣ","start_offset":0,"end_offset":7,"type":"<ALPHANUM>","position":1},{"token":"ラ","start_offset":7,"end_offset":8,"type":"<KATAKANA>","position":2}]} |
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 'http://localhost:9200/testas/_search' -d '{"query" : { "query_string" : {"query" : "name:varškė"} }}' |
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
echo "Deleting the test index" | |
curl -XDELETE localhost:9200/test-idx | |
echo | |
echo "Creating the test index" | |
curl -XPUT localhost:9200/test-idx -d '{ | |
"settings": { | |
"index" : { | |
"number_of_shards" : 1, | |
"number_of_replicas" : 0 | |
} |