This file contains hidden or 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 | |
| echo | |
| echo '===========================' | |
| echo 'Creating an empty index' | |
| echo '===========================' | |
| curl -XDELETE localhost:9200/test | |
| curl -XPOST localhost:9200/test/ -d '{"settings": {"index.number_of_shards": 1}}' | |
| echo |
This file contains hidden or 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
| { | |
| "query": { | |
| "function_score": { | |
| "query": { | |
| "multi_match": { | |
| "query": "gospel", | |
| "fields": [ | |
| "title.raw^60", | |
| "authors.raw^40", | |
| "subjects.raw^20", |
This file contains hidden or 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
| { | |
| "size": 100, | |
| "query": { | |
| "filtered": { | |
| "query": { | |
| "multi_match": { | |
| "query": "gospel", | |
| "fields": [ | |
| "title.raw^60", | |
| "authors.raw^40", |
This file contains hidden or 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
| msg.c: In function 'getJSONPropVal': | |
| msg.c:2736:3: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json/json_object.h:217) [-Wdeprecated-declarations] | |
| field = json_object_object_get(parent, (char*)leaf); | |
| ^ | |
| msg.c: In function 'msgGetJSONPropJSON': | |
| msg.c:2789:2: warning: 'json_object_object_get' is deprecated (declared at /usr/include/json/json_object.h:217) [-Wdeprecated-declarations] | |
| *pjson = json_object_object_get(parent, (char*)leaf); | |
| ^ | |
| In file included from /usr/include/json/linkhash.h:16:0, | |
| from /usr/include/json/json.h:22, |
This file contains hidden or 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
| { | |
| "size": 10, | |
| "query": { | |
| "filtered": { | |
| "query": { | |
| "bool": { | |
| "should": [ | |
| { | |
| "multi_match": { | |
| "analyzer": "whitespace_shingle", |
This file contains hidden or 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
| { | |
| "from": 0, | |
| "size": 25, | |
| "query": { | |
| "filtered": { | |
| "query": { | |
| "match_all": {} | |
| }, | |
| "filter": { | |
| "bool": { |
This file contains hidden or 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 localhost:9200/test | |
| curl -XPOST localhost:9200/test/test -d '{"a": "foo"}' | |
| curl -XPOST localhost:9200/test/test -d '{"a": "foo"}' | |
| curl -XPOST localhost:9200/test/test -d '{"a": "foo2"}' | |
| curl -XPOST localhost:9200/test/test -d '{"a": "foo2"}' | |
| curl -XPOST localhost:9200/test/test -d '{"a": "foo"}' | |
| curl localhost:9200/test/_refresh | |
| # ElasticsearchIllegalArgumentException[supersetFreq > supersetSize, in JLHScore.score(..)] | |
| curl 'localhost:9200/test/_search?pretty&search_type=count' -d '{ |
This file contains hidden or 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
| {"message":"proxy-435.dialup.xtra.co.nz - - [22/Apr/2009:18:52:51 +1200] \"GET /images/photos/455.jpg HTTP/1.1\" 200 986 \"-\" \"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit/525.13 (KHTML, like Gecko) Version/3.1 Safari/525.13\" \"-\"","@version":"1","@timestamp":"2015-04-16T17:35:24.585Z","host":"rgheorghe-suse.rgheorghe-local","path":"/opt/example.log.raw","clientip":"proxy-435.dialup.xtra.co.nz","ident":"-","auth":"-","timestamp":"22/Apr/2009:18:52:51 +1200","verb":"GET","request":"/images/photos/455.jpg","httpversion":"1.1","response":"200","bytes":"986","referrer":"\"-\"","agent":"\"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit/525.13 (KHTML, like Gecko) Version/3.1 Safari/525.13\""} | |
| {"message":"proxy-435.dialup.xtra.co.nz - - [22/Apr/2009:18:52:51 +1200] \"GET /images/nav/tab_left_middle.gif HTTP/1.1\" 200 1020 \"-\" \"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit/525.13 (KHTML, like Gecko) Version/3.1 Safari/525.13\" \"-\"","@version":"1", |
This file contains hidden or 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 ===Removing everything=== | |
| curl -XDELETE localhost:9200/test | |
| echo | |
| echo ===Putting empty index=== | |
| curl -XPUT localhost:9200/test | |
| echo | |
| echo ====Putting mapping=== | |
| curl -XPUT localhost:9200/test/test/_mapping -d '{ | |
| "test": { | |
| "properties": { |
This file contains hidden or 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/bash | |
| CURRENTINDEX="test" | |
| NEWINDEX="newindex" | |
| #where the indices are stored within the DATADIR | |
| INDICESDIR=/var/lib/elasticsearch/elasticsearch/nodes/0/indices/ | |
| #get the metadata for the current index | |
| curl localhost:9200/$CURRENTINDEX/_settings?pretty=true > /tmp/settings | |
| curl localhost:9200/$CURRENTINDEX/_mapping?pretty=true > /tmp/mappings |
OlderNewer