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 'http://localhost:9200/test' | |
curl -XPOST 'http://localhost:9200/test' -d ' | |
{ | |
"settings" : { | |
"index" : { | |
"analysis" : { | |
"filter": { | |
"eNGram" : { | |
"type": "edgeNGram", |
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
# value-style before object-style => "auto upgrade" | |
curl -XDELETE 'http://localhost:9200/test' | |
curl -XPUT 'localhost:9200/test/test/1' -d ' | |
{ | |
"obj" : "value" | |
} | |
' |
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 | |
curl -XDELETE 'localhost:9200/notifave' | |
curl -XDELETE 'localhost:9200/_percolator' | |
curl -XPUT 'localhost:9200/notifave' -d ' | |
{ | |
"mappings" : { | |
"article" : { |
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/sort' | |
curl -XPOST 'localhost:9200/sort' | |
curl -XPUT 'localhost:9200/sort/sort/1' -d ' | |
{ | |
"num" : 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
curl -XDELETE 'localhost:9200/scriptsort' | |
curl -XPOST 'localhost:9200/scriptsort' -d ' | |
{ | |
"mappings": { | |
"test": { | |
"_id": { | |
"index" : "not_analyzed", | |
"stored": "yes" | |
} |
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 'http://localhost:9200/test_cms' | |
curl -XPUT 'http://localhost:9200/test_cms' | |
curl -XPUT 'http://localhost:9200/test_cms/en/_mapping' -d '{ | |
"document" : { | |
"properties": { | |
"name": { "type": "string" }, | |
"content": { | |
"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
curl -XDELETE 'localhost:9200/jsonld' | |
curl -XPOST 'localhost:9200/jsonld' | |
curl -XPUT 'localhost:9200/jsonld/doc/1' -d ' | |
{ | |
"@context": | |
{ | |
"dc": "http://purl.org/dc/elements/1.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
curl -XDELETE 'localhost:9200/ling' | |
echo '{ | |
"settings" : { | |
"index" : { | |
"analysis" : { | |
"analyzer" : { | |
"default" : { | |
"type" : "custom", |
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
# required plugins: analysis-icu, analysis-combo | |
# ./bin/plugin -install elasticsearch/elasticsearch-analysis-icu/1.7.0 | |
# ./bin/plugin -install yakaz/elasticsearch-analysis-combo/1.1.0 | |
# | |
curl -XDELETE 'localhost:9200/ling' | |
echo '{ | |
"settings" : { | |
"index" : { |
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 -XPUT 'localhost:9200/test/doc/1' -d ' | |
{ | |
"sentence" : "Hi 1!" | |
} | |
' |