diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/RestTestsFromSnippetsTask.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/RestTestsFromSnippetsTask.groovy
index 9f840df36e1..c9f5668a326 100644
--- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/RestTestsFromSnippetsTask.groovy
+++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/RestTestsFromSnippetsTask.groovy
@@ -170,6 +170,13 @@ public class RestTestsFromSnippetsTask extends SnippetsTask {
current.println('---')
current.println("setup:")
body(setup)
+ // always wait for yellow before anything is executed
+ current.println(
+ " - do:\n" +
+ " raw:\n" +
+ " method: GET\n" +
+ " path: \"_cluster/health\"\n" +
+ " wait_for_status: \"yellow\"")
}
private void body(Snippet snippet) {
diff --git a/docs/out b/docs/out
new file mode 100644
index 00000000000..5a0af906e79
--- /dev/null
+++ b/docs/out
@@ -0,0 +1,11165 @@
+:buildSrc:compileJava UP-TO-DATE
+:buildSrc:compileGroovy
+:buildSrc:writeVersionProperties UP-TO-DATE
+:buildSrc:processResources UP-TO-DATE
+:buildSrc:classes
+:buildSrc:jar
+:buildSrc:assemble
+:buildSrc:compileTestJava UP-TO-DATE
+:buildSrc:compileTestGroovy UP-TO-DATE
+:buildSrc:processTestResources UP-TO-DATE
+:buildSrc:testClasses UP-TO-DATE
+:buildSrc:test UP-TO-DATE
+:buildSrc:check UP-TO-DATE
+:buildSrc:build
+=======================================
+Elasticsearch Build Hamster says Hello!
+=======================================
+ Gradle Version : 2.13
+ OS Info : Linux 3.13.0-39-generic (amd64)
+ JDK Version : Oracle Corporation 1.8.0_65 [Java HotSpot(TM) 64-Bit Server VM 25.65-b01]
+ JAVA_HOME : /usr/java/jdk1.8.0_65
+:docs:clean
+:docs:processTestResources UP-TO-DATE
+:rest-api-spec:compileJava UP-TO-DATE
+:rest-api-spec:processResources UP-TO-DATE
+:rest-api-spec:classes UP-TO-DATE
+:rest-api-spec:jar UP-TO-DATE
+:docs:copyRestSpec
+:docs:buildRestTests
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "title": {
+ "type": "text",
+ "analyzer": "standard"
+ }
+ }
+ }
+ }
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "my_number": {
+ "type": "long",
+ "fields": {
+ "keyword": {
+ "type": "keyword"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "analyzer": "whitespace",
+ "text": "The quick brown fox."
+}
+emit snippet
+body part:
+{
+ "tokenizer": "standard",
+ "filter": [ "lowercase", "asciifolding" ],
+ "text": "Is this déja vu?"
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "analysis": {
+ "analyzer": {
+ "std_folded": {
+ "type": "custom",
+ "tokenizer": "standard",
+ "filter": [
+ "lowercase",
+ "asciifolding"
+ ]
+ }
+ }
+ }
+ },
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "my_text": {
+ "type": "text",
+ "analyzer": "std_folded"
+ }
+ }
+ }
+ }
+}
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+body part:
+{
+ "analyzer": "std_folded",
+ "text": "Is this déjà vu?"
+}
+emit snippet
+body part:
+{
+ "field": "my_text",
+ "text": "Is this déjà vu?"
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "tokenizer": "classic",
+ "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "analysis": {
+ "analyzer": {
+ "my_analyzer": {
+ "tokenizer": "my_tokenizer"
+ }
+ },
+ "tokenizer": {
+ "my_tokenizer": {
+ "type": "classic",
+ "max_token_length": 5
+ }
+ }
+ }
+ }
+}
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+body part:
+{
+ "analyzer": "my_analyzer",
+ "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "tokenizer": "whitespace",
+ "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "tokenizer": "ngram",
+ "text": "Quick Fox"
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "analysis": {
+ "analyzer": {
+ "my_analyzer": {
+ "tokenizer": "my_tokenizer"
+ }
+ },
+ "tokenizer": {
+ "my_tokenizer": {
+ "type": "ngram",
+ "min_gram": 3,
+ "max_gram": 3,
+ "token_chars": [
+ "letter",
+ "digit"
+ ]
+ }
+ }
+ }
+ }
+}
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+body part:
+{
+ "analyzer": "my_analyzer",
+ "text": "2 Quick Foxes."
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "tokenizer": "letter",
+ "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "tokenizer": "pattern",
+ "text": "The foo_bar_size's default is 5."
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "analysis": {
+ "analyzer": {
+ "my_analyzer": {
+ "tokenizer": "my_tokenizer"
+ }
+ },
+ "tokenizer": {
+ "my_tokenizer": {
+ "type": "pattern",
+ "pattern": ","
+ }
+ }
+ }
+ }
+}
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+body part:
+{
+ "analyzer": "my_analyzer",
+ "text": "comma,separated,values"
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "analysis": {
+ "analyzer": {
+ "my_analyzer": {
+ "tokenizer": "my_tokenizer"
+ }
+ },
+ "tokenizer": {
+ "my_tokenizer": {
+ "type": "pattern",
+ "pattern": "\"((?:\\\\\"|[^\"]|\\\\\")+)\"",
+ "group": 1
+ }
+ }
+ }
+ }
+}
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+body part:
+{
+ "analyzer": "my_analyzer",
+ "text": "\"value\", \"value with embedded \\\" quote\""
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "tokenizer": "edge_ngram",
+ "text": "Quick Fox"
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "analysis": {
+ "analyzer": {
+ "my_analyzer": {
+ "tokenizer": "my_tokenizer"
+ }
+ },
+ "tokenizer": {
+ "my_tokenizer": {
+ "type": "edge_ngram",
+ "min_gram": 2,
+ "max_gram": 10,
+ "token_chars": [
+ "letter",
+ "digit"
+ ]
+ }
+ }
+ }
+ }
+}
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+body part:
+{
+ "analyzer": "my_analyzer",
+ "text": "2 Quick Foxes."
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "analysis": {
+ "analyzer": {
+ "autocomplete": {
+ "tokenizer": "autocomplete",
+ "filter": [
+ "lowercase"
+ ]
+ },
+ "autocomplete_search": {
+ "tokenizer": "lowercase"
+ }
+ },
+ "tokenizer": {
+ "autocomplete": {
+ "type": "edge_ngram",
+ "min_gram": 2,
+ "max_gram": 10,
+ "token_chars": [
+ "letter"
+ ]
+ }
+ }
+ }
+ },
+ "mappings": {
+ "doc": {
+ "properties": {
+ "title": {
+ "type": "text",
+ "analyzer": "autocomplete",
+ "search_analyzer": "autocomplete_search"
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "title": "Quick Foxes"
+}
+emit snippet
+emit snippet
+body part:
+{
+ "query": {
+ "match": {
+ "title": {
+ "query": "Quick Fo",
+ "operator": "and"
+ }
+ }
+ }
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "tokenizer": "uax_url_email",
+ "text": "Email me at john.smith@global-international.com"
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "analysis": {
+ "analyzer": {
+ "my_analyzer": {
+ "tokenizer": "my_tokenizer"
+ }
+ },
+ "tokenizer": {
+ "my_tokenizer": {
+ "type": "uax_url_email",
+ "max_token_length": 5
+ }
+ }
+ }
+ }
+}
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+body part:
+{
+ "analyzer": "my_analyzer",
+ "text": "john.smith@global-international.com"
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "tokenizer": "path_hierarchy",
+ "text": "/one/two/three"
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "analysis": {
+ "analyzer": {
+ "my_analyzer": {
+ "tokenizer": "my_tokenizer"
+ }
+ },
+ "tokenizer": {
+ "my_tokenizer": {
+ "type": "path_hierarchy",
+ "delimiter": "-",
+ "replacement": "/",
+ "skip": 2
+ }
+ }
+ }
+ }
+}
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+body part:
+{
+ "analyzer": "my_analyzer",
+ "text": "one-two-three-four-five"
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "tokenizer": "standard",
+ "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "analysis": {
+ "analyzer": {
+ "my_analyzer": {
+ "tokenizer": "my_tokenizer"
+ }
+ },
+ "tokenizer": {
+ "my_tokenizer": {
+ "type": "standard",
+ "max_token_length": 5
+ }
+ }
+ }
+ }
+}
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+body part:
+{
+ "analyzer": "my_analyzer",
+ "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "tokenizer": "keyword",
+ "text": "New York"
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "tokenizer": "thai",
+ "text": "การที่ได้ต้องแสดงว่างานดี"
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "tokenizer": "lowercase",
+ "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "analyzer": "standard",
+ "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "analysis": {
+ "analyzer": {
+ "my_english_analyzer": {
+ "type": "standard",
+ "max_token_length": 5,
+ "stopwords": "_english_"
+ }
+ }
+ }
+ }
+}
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+body part:
+{
+ "analyzer": "my_english_analyzer",
+ "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "analyzer": "simple",
+ "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "analyzer": "whitespace",
+ "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "analyzer": "keyword",
+ "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "analysis": {
+ "analyzer": {
+ "std_english": {
+ "type": "standard",
+ "stopwords": "_english_"
+ }
+ }
+ }
+ },
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "my_text": {
+ "type": "text",
+ "analyzer": "standard",
+ "fields": {
+ "english": {
+ "type": "text",
+ "analyzer": "std_english"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+body part:
+{
+ "field": "my_text",
+ "text": "The old brown cow"
+}
+emit snippet
+body part:
+{
+ "field": "my_text.english",
+ "text": "The old brown cow"
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "analyzer": "stop",
+ "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "analysis": {
+ "analyzer": {
+ "my_stop_analyzer": {
+ "type": "stop",
+ "stopwords": ["the", "over"]
+ }
+ }
+ }
+ }
+}
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+body part:
+{
+ "analyzer": "my_stop_analyzer",
+ "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "analysis": {
+ "analyzer": {
+ "my_custom_analyzer": {
+ "type": "custom",
+ "tokenizer": "standard",
+ "char_filter": [
+ "html_strip"
+ ],
+ "filter": [
+ "lowercase",
+ "asciifolding"
+ ]
+ }
+ }
+ }
+ }
+}
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+body part:
+{
+ "analyzer": "my_custom_analyzer",
+ "text": "Is this déjà vu?"
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "analysis": {
+ "analyzer": {
+ "my_custom_analyzer": {
+ "type": "custom",
+ "char_filter": [
+ "emoticons"
+ ],
+ "tokenizer": "punctuation",
+ "filter": [
+ "lowercase",
+ "english_stop"
+ ]
+ }
+ },
+ "tokenizer": {
+ "punctuation": {
+ "type": "pattern",
+ "pattern": "[ .,!?]"
+ }
+ },
+ "char_filter": {
+ "emoticons": {
+ "type": "mapping",
+ "mappings": [
+ ":) => _happy_",
+ ":( => _sad_"
+ ]
+ }
+ },
+ "filter": {
+ "english_stop": {
+ "type": "stop",
+ "stopwords": "_english_"
+ }
+ }
+ }
+ }
+}
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+body part:
+{
+ "analyzer": "my_custom_analyzer",
+ "text": "I'm a :) person, and you?"
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "analyzer": "pattern",
+ "text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "analysis": {
+ "analyzer": {
+ "my_email_analyzer": {
+ "type": "pattern",
+ "pattern": "\\W|_",
+ "lowercase": true
+ }
+ }
+ }
+ }
+}
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+body part:
+{
+ "analyzer": "my_email_analyzer",
+ "text": "John_Smith@foo-bar.com"
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "analysis": {
+ "analyzer": {
+ "camel": {
+ "type": "pattern",
+ "pattern": "([^\\p{L}\\d]+)|(?<=\\D)(?=\\d)|(?<=\\d)(?=\\D)|(?<=[\\p{L}&&[^\\p{Lu}]])(?=\\p{Lu})|(?<=\\p{Lu})(?=\\p{Lu}[\\p{L}&&[^\\p{Lu}]])"
+ }
+ }
+ }
+ }
+}
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+body part:
+{
+ "analyzer": "camel",
+ "text": "MooseX::FTPClass2_beta"
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "analyzer": "fingerprint",
+ "text": "Yes yes, Gödel said this sentence is consistent and."
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "analysis": {
+ "analyzer": {
+ "my_fingerprint_analyzer": {
+ "type": "fingerprint",
+ "stopwords": "_english_"
+ }
+ }
+ }
+ }
+}
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+body part:
+{
+ "analyzer": "my_fingerprint_analyzer",
+ "text": "Yes yes, Gödel said this sentence is consistent and."
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "tokenizer": "keyword",
+ "char_filter": [ "html_strip" ],
+ "text": "
I'm so happy!
"
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "analysis": {
+ "analyzer": {
+ "my_analyzer": {
+ "tokenizer": "keyword",
+ "char_filter": ["my_char_filter"]
+ }
+ },
+ "char_filter": {
+ "my_char_filter": {
+ "type": "html_strip",
+ "escaped_tags": ["b"]
+ }
+ }
+ }
+ }
+}
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+body part:
+{
+ "analyzer": "my_analyzer",
+ "text": "I'm so happy!
"
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "analysis": {
+ "analyzer": {
+ "my_analyzer": {
+ "tokenizer": "keyword",
+ "char_filter": [
+ "my_char_filter"
+ ]
+ }
+ },
+ "char_filter": {
+ "my_char_filter": {
+ "type": "mapping",
+ "mappings": [
+ "٠ => 0",
+ "١ => 1",
+ "٢ => 2",
+ "٣ => 3",
+ "٤ => 4",
+ "٥ => 5",
+ "٦ => 6",
+ "٧ => 7",
+ "٨ => 8",
+ "٩ => 9"
+ ]
+ }
+ }
+ }
+ }
+}
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+body part:
+{
+ "analyzer": "my_analyzer",
+ "text": "My license plate is ٢٥٠١٥"
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "analysis": {
+ "analyzer": {
+ "my_analyzer": {
+ "tokenizer": "standard",
+ "char_filter": [
+ "my_char_filter"
+ ]
+ }
+ },
+ "char_filter": {
+ "my_char_filter": {
+ "type": "mapping",
+ "mappings": [
+ ":) => _happy_",
+ ":( => _sad_"
+ ]
+ }
+ }
+ }
+ }
+}
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+body part:
+{
+ "analyzer": "my_analyzer",
+ "text": "I'm delighted about it :("
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "analysis": {
+ "analyzer": {
+ "my_analyzer": {
+ "tokenizer": "standard",
+ "char_filter": [
+ "my_char_filter"
+ ]
+ }
+ },
+ "char_filter": {
+ "my_char_filter": {
+ "type": "pattern_replace",
+ "pattern": "(\\d+)-(?=\\d)",
+ "replacement": "$1_"
+ }
+ }
+ }
+ }
+}
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+body part:
+{
+ "analyzer": "my_analyzer",
+ "text": "My credit card is 123-456-789"
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "analysis": {
+ "analyzer": {
+ "my_analyzer": {
+ "tokenizer": "standard",
+ "char_filter": [
+ "my_char_filter"
+ ],
+ "filter": [
+ "lowercase"
+ ]
+ }
+ },
+ "char_filter": {
+ "my_char_filter": {
+ "type": "pattern_replace",
+ "pattern": "(?<=\\p{Lower})(?=\\p{Upper})",
+ "replacement": " "
+ }
+ }
+ }
+ },
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "text": {
+ "type": "text",
+ "analyzer": "my_analyzer"
+ }
+ }
+ }
+ }
+}
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+body part:
+{
+ "analyzer": "my_analyzer",
+ "text": "The fooBarBaz method"
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+query part: refresh
+body part:
+{
+ "text": "The fooBarBaz method"
+}
+emit snippet
+body part:
+{
+ "query": {
+ "match": {
+ "text": "bar"
+ }
+ },
+ "highlight": {
+ "fields": {
+ "text": {}
+ }
+ }
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query" : {
+ "match_all": {}
+ },
+ "fielddata_fields" : ["test1", "test2"]
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query" : {
+ "term" : { "user" : "kimchy" }
+ }
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "from" : 0, "size" : 10,
+ "query" : {
+ "term" : { "user" : "kimchy" }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "_source": false,
+ "query" : {
+ "term" : { "user" : "kimchy" }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "_source": "obj.*",
+ "query" : {
+ "term" : { "user" : "kimchy" }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "_source": [ "obj1.*", "obj2.*" ],
+ "query" : {
+ "term" : { "user" : "kimchy" }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "_source": {
+ "include": [ "obj1.*", "obj2.*" ],
+ "exclude": [ "*.description" ]
+ },
+ "query" : {
+ "term" : { "user" : "kimchy" }
+ }
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "explain": true,
+ "query" : {
+ "term" : { "user" : "kimchy" }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query" : {
+ "match_all": {}
+ },
+ "script_fields" : {
+ "test1" : {
+ "script" : "doc['my_field_name'].value * 2"
+ },
+ "test2" : {
+ "script" : {
+ "inline": "doc['my_field_name'].value * factor",
+ "params" : {
+ "factor" : 2.0
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+ {
+ "query" : {
+ "match_all": {}
+ },
+ "script_fields" : {
+ "test1" : {
+ "script" : "_source.obj1.obj2"
+ }
+ }
+ }
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query" : {
+ "match": { "user": "kimchy" }
+ },
+ "highlight" : {
+ "fields" : {
+ "content" : {}
+ }
+ }
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query" : {
+ "match": { "user": "kimchy" }
+ },
+ "highlight" : {
+ "fields" : {
+ "content" : {"type" : "plain"}
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query" : {
+ "match": { "user": "kimchy" }
+ },
+ "highlight" : {
+ "fields" : {
+ "content" : {"force_source" : true}
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query" : {
+ "match": { "user": "kimchy" }
+ },
+ "highlight" : {
+ "pre_tags" : [""],
+ "post_tags" : [""],
+ "fields" : {
+ "_all" : {}
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query" : {
+ "match": { "user": "kimchy" }
+ },
+ "highlight" : {
+ "pre_tags" : ["", ""],
+ "post_tags" : ["", ""],
+ "fields" : {
+ "_all" : {}
+ }
+ }
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query" : {
+ "match": { "user": "kimchy" }
+ },
+ "highlight" : {
+ "tags_schema" : "styled",
+ "fields" : {
+ "content" : {}
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query" : {
+ "match": { "user": "kimchy" }
+ },
+ "highlight" : {
+ "fields" : {
+ "content" : {"fragment_size" : 150, "number_of_fragments" : 3}
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query" : {
+ "match": { "user": "kimchy" }
+ },
+ "highlight" : {
+ "order" : "score",
+ "fields" : {
+ "content" : {"fragment_size" : 150, "number_of_fragments" : 3}
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query" : {
+ "match": { "user": "kimchy" }
+ },
+ "highlight" : {
+ "fields" : {
+ "_all" : {},
+ "bio.title" : {"number_of_fragments" : 0}
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query" : {
+ "match": { "user": "kimchy" }
+ },
+ "highlight" : {
+ "fields" : {
+ "content" : {
+ "fragment_size" : 150,
+ "number_of_fragments" : 3,
+ "no_match_size": 150
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "fields": [ "_id" ],
+ "query" : {
+ "match": {
+ "content": {
+ "query": "foo bar"
+ }
+ }
+ },
+ "rescore": {
+ "window_size": 50,
+ "query": {
+ "rescore_query" : {
+ "match_phrase": {
+ "content": {
+ "query": "foo bar",
+ "phrase_slop": 1
+ }
+ }
+ },
+ "rescore_query_weight" : 10
+ }
+ },
+ "highlight" : {
+ "order" : "score",
+ "fields" : {
+ "content" : {
+ "fragment_size" : 150,
+ "number_of_fragments" : 3,
+ "highlight_query": {
+ "bool": {
+ "must": {
+ "match": {
+ "content": {
+ "query": "foo bar"
+ }
+ }
+ },
+ "should": {
+ "match_phrase": {
+ "content": {
+ "query": "foo bar",
+ "phrase_slop": 1,
+ "boost": 10.0
+ }
+ }
+ },
+ "minimum_should_match": 0
+ }
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query" : {
+ "match": { "user": "kimchy" }
+ },
+ "highlight" : {
+ "number_of_fragments" : 3,
+ "fragment_size" : 150,
+ "fields" : {
+ "_all" : { "pre_tags" : [""], "post_tags" : [""] },
+ "bio.title" : { "number_of_fragments" : 0 },
+ "bio.author" : { "number_of_fragments" : 0 },
+ "bio.content" : { "number_of_fragments" : 5, "order" : "score" }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query" : {
+ "match": { "user": "kimchy" }
+ },
+ "highlight" : {
+ "require_field_match": false,
+ "fields": {
+ "_all" : { "pre_tags" : [""], "post_tags" : [""] }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "query_string": {
+ "query": "content.plain:running scissors",
+ "fields": ["content"]
+ }
+ },
+ "highlight": {
+ "order": "score",
+ "fields": {
+ "content": {
+ "matched_fields": ["content", "content.plain"],
+ "type" : "fvh"
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "query_string": {
+ "query": "running scissors",
+ "fields": ["content", "content.plain^10"]
+ }
+ },
+ "highlight": {
+ "order": "score",
+ "fields": {
+ "content": {
+ "matched_fields": ["content", "content.plain"],
+ "type" : "fvh"
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "query_string": {
+ "query": "running scissors",
+ "fields": ["content", "content.plain^10"]
+ }
+ },
+ "highlight": {
+ "order": "score",
+ "fields": {
+ "content": {
+ "matched_fields": ["content.plain"],
+ "type" : "fvh"
+ }
+ }
+ }
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "min_score": 0.5,
+ "query" : {
+ "term" : { "user" : "kimchy" }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+query part: preference=xyzabc123
+body part:
+{
+ "query": {
+ "match": {
+ "title": "elasticsearch"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool" : {
+ "should" : [
+ {"match" : { "name.first" : {"query" : "shay", "_name" : "first"} }},
+ {"match" : { "name.last" : {"query" : "banon", "_name" : "last"} }}
+ ],
+ "filter" : {
+ "terms" : {
+ "name.last" : ["banon", "kimchy"],
+ "_name" : "test"
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "indices_boost" : {
+ "index1" : 1.4,
+ "index2" : 1.3
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "post_date": { "type": "date" },
+ "user": {
+ "type": "keyword"
+ },
+ "name": {
+ "type": "keyword"
+ },
+ "age": { "type": "integer" }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "sort" : [
+ { "post_date" : {"order" : "asc"}},
+ "user",
+ { "name" : "desc" },
+ { "age" : "desc" },
+ "_score"
+ ],
+ "query" : {
+ "term" : { "user" : "kimchy" }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+query part: refresh
+body part:
+{
+ "product": "chocolate",
+ "price": [20, 4]
+}
+emit snippet
+body part:
+{
+ "query" : {
+ "term" : { "product" : "chocolate" }
+ },
+ "sort" : [
+ {"price" : {"order" : "asc", "mode" : "avg"}}
+ ]
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query" : {
+ "term" : { "product" : "chocolate" }
+ },
+ "sort" : [
+ {
+ "offer.price" : {
+ "mode" : "avg",
+ "order" : "asc",
+ "nested_path" : "offer",
+ "nested_filter" : {
+ "term" : { "offer.color" : "blue" }
+ }
+ }
+ }
+ ]
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "sort" : [
+ { "price" : {"missing" : "_last"} }
+ ],
+ "query" : {
+ "term" : { "product" : "chocolate" }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "sort" : [
+ { "price" : {"unmapped_type" : "long"} }
+ ],
+ "query" : {
+ "term" : { "product" : "chocolate" }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "sort" : [
+ {
+ "_geo_distance" : {
+ "pin.location" : [-70, 40],
+ "order" : "asc",
+ "unit" : "km",
+ "mode" : "min",
+ "distance_type" : "sloppy_arc"
+ }
+ }
+ ],
+ "query" : {
+ "term" : { "user" : "kimchy" }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "sort" : [
+ {
+ "_geo_distance" : {
+ "pin.location" : {
+ "lat" : 40,
+ "lon" : -70
+ },
+ "order" : "asc",
+ "unit" : "km"
+ }
+ }
+ ],
+ "query" : {
+ "term" : { "user" : "kimchy" }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "sort" : [
+ {
+ "_geo_distance" : {
+ "pin.location" : "40,-70",
+ "order" : "asc",
+ "unit" : "km"
+ }
+ }
+ ],
+ "query" : {
+ "term" : { "user" : "kimchy" }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "sort" : [
+ {
+ "_geo_distance" : {
+ "pin.location" : "drm3btev3e86",
+ "order" : "asc",
+ "unit" : "km"
+ }
+ }
+ ],
+ "query" : {
+ "term" : { "user" : "kimchy" }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "sort" : [
+ {
+ "_geo_distance" : {
+ "pin.location" : [-70, 40],
+ "order" : "asc",
+ "unit" : "km"
+ }
+ }
+ ],
+ "query" : {
+ "term" : { "user" : "kimchy" }
+ }
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query" : {
+ "term" : { "user" : "kimchy" }
+ },
+ "sort" : {
+ "_script" : {
+ "type" : "number",
+ "script" : {
+ "inline": "doc['field_name'].value * factor",
+ "params" : {
+ "factor" : 1.1
+ }
+ },
+ "order" : "asc"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "track_scores": true,
+ "sort" : [
+ { "post_date" : {"order" : "desc"} },
+ { "name" : "desc" },
+ { "age" : "desc" }
+ ],
+ "query" : {
+ "term" : { "user" : "kimchy" }
+ }
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "version": true,
+ "query" : {
+ "term" : { "user" : "kimchy" }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "fields" : ["user", "postDate"],
+ "query" : {
+ "term" : { "user" : "kimchy" }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "fields" : [],
+ "query" : {
+ "term" : { "user" : "kimchy" }
+ }
+}
+handle snippet
+null
+emit snippet
+body part:
+{
+ "mappings": {
+ "item": {
+ "properties": {
+ "brand": { "type": "keyword"},
+ "color": { "type": "keyword"},
+ "model": { "type": "keyword"}
+ }
+ }
+ }
+}
+emit snippet
+query part: refresh
+body part:
+{
+ "brand": "gucci",
+ "color": "red",
+ "model": "slim"
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool": {
+ "filter": [
+ { "term": { "color": "red" }},
+ { "term": { "brand": "gucci" }}
+ ]
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool": {
+ "filter": [
+ { "term": { "color": "red" }},
+ { "term": { "brand": "gucci" }}
+ ]
+ }
+ },
+ "aggs": {
+ "models": {
+ "terms": { "field": "model" }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool": {
+ "filter": {
+ "term": { "brand": "gucci" }
+ }
+ }
+ },
+ "aggs": {
+ "colors": {
+ "terms": { "field": "color" }
+ },
+ "color_red": {
+ "filter": {
+ "term": { "color": "red" }
+ },
+ "aggs": {
+ "models": {
+ "terms": { "field": "model" }
+ }
+ }
+ }
+ },
+ "post_filter": {
+ "term": { "color": "red" }
+ }
+}
+handle snippet
+test snippet
+
+ - do:
+ bulk:
+ index: twitter
+ type: tweet
+ refresh: true
+ body: |
+ {"index":{"_id": "0"}}
+ {"user": "kimchy", "message": "trying out Elasticsearch", "date": "2009-11-15T14:12:12", "likes": 0}
+ {"index":{"_id": "1"}}
+ {"user": "test", "message": "some message with the number 1", "date": "2009-11-15T14:12:12", "likes": 1}
+ {"index":{"_id": "2"}}
+ {"user": "test", "message": "some message with the number 2", "date": "2009-11-15T14:12:12", "likes": 2}
+ {"index":{"_id": "3"}}
+ {"user": "test", "message": "some message with the number 3", "date": "2009-11-15T14:12:12", "likes": 3}
+ {"index":{"_id": "4"}}
+ {"user": "test", "message": "some message with the number 4", "date": "2009-11-15T14:12:12", "likes": 4}
+emit snippet
+body part:
+{
+ "size": 10,
+ "query": {
+ "match" : {
+ "title" : "elasticsearch"
+ }
+ },
+ "sort": [
+ {"date": "asc"},
+ {"_uid": "desc"}
+ ]
+}
+handle snippet
+test snippet
+
+ - do:
+ bulk:
+ index: twitter
+ type: tweet
+ refresh: true
+ body: |
+ {"index":{"_id": "0"}}
+ {"user": "kimchy", "message": "trying out Elasticsearch", "date": "2009-11-15T14:12:12", "likes": 0}
+ {"index":{"_id": "1"}}
+ {"user": "test", "message": "some message with the number 1", "date": "2009-11-15T14:12:12", "likes": 1}
+ {"index":{"_id": "2"}}
+ {"user": "test", "message": "some message with the number 2", "date": "2009-11-15T14:12:12", "likes": 2}
+ {"index":{"_id": "3"}}
+ {"user": "test", "message": "some message with the number 3", "date": "2009-11-15T14:12:12", "likes": 3}
+ {"index":{"_id": "4"}}
+ {"user": "test", "message": "some message with the number 4", "date": "2009-11-15T14:12:12", "likes": 4}
+emit snippet
+body part:
+{
+ "size": 10,
+ "query": {
+ "match" : {
+ "title" : "elasticsearch"
+ }
+ },
+ "search_after": [1463538857, "tweet#654323"],
+ "sort": [
+ {"date": "asc"},
+ {"_uid": "desc"}
+ ]
+}
+handle snippet
+null
+emit snippet
+query part: refresh
+body part:
+{"index":{"_id":1}}
+{"user" : "kimchy", "post_date" : "2009-11-15T14:12:12", "message" : "trying out Elasticsearch"}
+{"index":{"_id":2}}
+{"user" : "kimchi", "post_date" : "2009-11-15T14:12:13", "message" : "My username is similar to @kimchy!"}
+handle snippet
+test snippet
+emit snippet
+query part: q=user:foo
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query" : {
+ "bool" : {
+ "must" : {
+ "query_string" : {
+ "query" : "*:*"
+ }
+ },
+ "filter" : {
+ "term" : { "user" : "kimchy" }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+query part: q=post_date:foo
+handle snippet
+handle snippet
+test snippet
+emit snippet
+query part: q=post_date:foo&explain=true
+handle snippet
+handle snippet
+test snippet
+emit snippet
+query part: rewrite=true
+body part:
+{
+ "query": {
+ "match": {
+ "user": {
+ "query": "kimchy",
+ "fuzziness": "auto"
+ }
+ }
+ }
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+query part: rewrite=true
+body part:
+{
+ "query": {
+ "more_like_this": {
+ "like": {
+ "_id": "2"
+ },
+ "boost_terms": 1
+ }
+ }
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+
+ - do:
+ bulk:
+ index: twitter
+ type: tweet
+ refresh: true
+ body: |
+ {"index":{"_id": "0"}}
+ {"user": "kimchy", "message": "trying out Elasticsearch", "date": "2009-11-15T14:12:12", "likes": 0}
+ {"index":{"_id": "1"}}
+ {"user": "test", "message": "some message with the number 1", "date": "2009-11-15T14:12:12", "likes": 1}
+ {"index":{"_id": "2"}}
+ {"user": "test", "message": "some message with the number 2", "date": "2009-11-15T14:12:12", "likes": 2}
+ {"index":{"_id": "3"}}
+ {"user": "test", "message": "some message with the number 3", "date": "2009-11-15T14:12:12", "likes": 3}
+ {"index":{"_id": "4"}}
+ {"user": "test", "message": "some message with the number 4", "date": "2009-11-15T14:12:12", "likes": 4}
+emit snippet
+query part: q=user:kimchy
+handle snippet
+handle snippet
+test snippet
+emit snippet
+query part: refresh
+body part:
+{
+ "user": "kimchy"
+}
+emit snippet
+query part: q=user:kimchy
+emit snippet
+body part:
+{
+ "query" : {
+ "term" : { "user" : "kimchy" }
+ }
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "multi_match" : {
+ "query": "this is a test",
+ "fields": [ "subject", "message" ]
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "multi_match" : {
+ "query": "Will Smith",
+ "fields": [ "title", "*_name" ]
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "multi_match" : {
+ "query" : "this is a test",
+ "fields" : [ "subject^3", "message" ]
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "multi_match" : {
+ "query": "brown fox",
+ "type": "best_fields",
+ "fields": [ "subject", "message" ],
+ "tie_breaker": 0.3
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "dis_max": {
+ "queries": [
+ { "match": { "subject": "brown fox" }},
+ { "match": { "message": "brown fox" }}
+ ],
+ "tie_breaker": 0.3
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "multi_match" : {
+ "query": "Will Smith",
+ "type": "best_fields",
+ "fields": [ "first_name", "last_name" ],
+ "operator": "and"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "multi_match" : {
+ "query": "quick brown fox",
+ "type": "most_fields",
+ "fields": [ "title", "title.original", "title.shingles" ]
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool": {
+ "should": [
+ { "match": { "title": "quick brown fox" }},
+ { "match": { "title.original": "quick brown fox" }},
+ { "match": { "title.shingles": "quick brown fox" }}
+ ]
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "multi_match" : {
+ "query": "quick brown f",
+ "type": "phrase_prefix",
+ "fields": [ "subject", "message" ]
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "dis_max": {
+ "queries": [
+ { "match_phrase_prefix": { "subject": "quick brown f" }},
+ { "match_phrase_prefix": { "message": "quick brown f" }}
+ ]
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "multi_match" : {
+ "query": "Will Smith",
+ "type": "cross_fields",
+ "fields": [ "first_name", "last_name" ],
+ "operator": "and"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "multi_match" : {
+ "query": "Jon",
+ "type": "cross_fields",
+ "fields": [
+ "first", "first.edge",
+ "last", "last.edge"
+ ]
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool": {
+ "should": [
+ {
+ "multi_match" : {
+ "query": "Will Smith",
+ "type": "cross_fields",
+ "fields": [ "first", "last" ],
+ "minimum_should_match": "50%"
+ }
+ },
+ {
+ "multi_match" : {
+ "query": "Will Smith",
+ "type": "cross_fields",
+ "fields": [ "*.edge" ]
+ }
+ }
+ ]
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "multi_match" : {
+ "query": "Jon",
+ "type": "cross_fields",
+ "analyzer": "standard",
+ "fields": [ "first", "last", "*.edge" ]
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "query_string" : {
+ "default_field" : "content",
+ "query" : "this AND that OR thus"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "query_string" : {
+ "fields" : ["content", "name"],
+ "query" : "this AND that"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "query_string": {
+ "query": "(content:this OR name:this) AND (content:that OR name:that)"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "query_string" : {
+ "fields" : ["content", "name^5"],
+ "query" : "this AND that OR thus",
+ "use_dis_max" : true
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "query_string" : {
+ "fields" : ["city.*"],
+ "query" : "this AND that OR thus",
+ "use_dis_max" : true
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "query_string" : {
+ "fields" : ["content", "name.*^5"],
+ "query" : "this AND that OR thus",
+ "use_dis_max" : true
+ }
+ }
+}
+handle snippet
+null
+emit snippet
+body part:
+{
+ "mappings": {
+ "location": {
+ "properties": {
+ "pin": {
+ "properties": {
+ "location": {
+ "type": "geo_point"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "pin" : {
+ "location" : {
+ "lat" : 40.12,
+ "lon" : -71.34
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool" : {
+ "must" : {
+ "match_all" : {}
+ },
+ "filter" : {
+ "geo_distance" : {
+ "distance" : "200km",
+ "pin.location" : {
+ "lat" : 40,
+ "lon" : -70
+ }
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool" : {
+ "must" : {
+ "match_all" : {}
+ },
+ "filter" : {
+ "geo_distance" : {
+ "distance" : "12km",
+ "pin.location" : {
+ "lat" : 40,
+ "lon" : -70
+ }
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool" : {
+ "must" : {
+ "match_all" : {}
+ },
+ "filter" : {
+ "geo_distance" : {
+ "distance" : "12km",
+ "pin.location" : [-70, 40]
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool" : {
+ "must" : {
+ "match_all" : {}
+ },
+ "filter" : {
+ "geo_distance" : {
+ "distance" : "12km",
+ "pin.location" : "40,-70"
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool" : {
+ "must" : {
+ "match_all" : {}
+ },
+ "filter" : {
+ "geo_distance" : {
+ "distance" : "12km",
+ "pin.location" : "drm3btev3e86"
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "match_all": {}
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "match_all": { "boost" : 1.2 }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "match_none": {}
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "more_like_this" : {
+ "fields" : ["title", "description"],
+ "like" : "Once upon a time",
+ "min_term_freq" : 1,
+ "max_query_terms" : 12
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "more_like_this" : {
+ "fields" : ["title", "description"],
+ "like" : [
+ {
+ "_index" : "imdb",
+ "_type" : "movies",
+ "_id" : "1"
+ },
+ {
+ "_index" : "imdb",
+ "_type" : "movies",
+ "_id" : "2"
+ },
+ "and potentially some more text here as well"
+ ],
+ "min_term_freq" : 1,
+ "max_query_terms" : 12
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "more_like_this" : {
+ "fields" : ["name.first", "name.last"],
+ "like" : [
+ {
+ "_index" : "marvel",
+ "_type" : "quotes",
+ "doc" : {
+ "name": {
+ "first": "Ben",
+ "last": "Grimm"
+ },
+ "tweet": "You got no idea what I'd... what I'd give to be invisible."
+ }
+ },
+ {
+ "_index" : "marvel",
+ "_type" : "quotes",
+ "_id" : "2"
+ }
+ ],
+ "min_term_freq" : 1,
+ "max_query_terms" : 12
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "movies": {
+ "properties": {
+ "title": {
+ "type": "text",
+ "term_vector": "yes"
+ },
+ "description": {
+ "type": "text"
+ },
+ "tags": {
+ "type": "text",
+ "fields" : {
+ "raw": {
+ "type" : "text",
+ "analyzer": "keyword",
+ "term_vector" : "yes"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "indices" : {
+ "indices" : ["index1", "index2"],
+ "query" : { "term" : { "tag" : "wow" } },
+ "no_match_query" : { "term" : { "tag" : "kow" } }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "range" : {
+ "age" : {
+ "gte" : 10,
+ "lte" : 20,
+ "boost" : 2.0
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "range" : {
+ "date" : {
+ "gte" : "now-1d/d",
+ "lt" : "now/d"
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "range" : {
+ "born" : {
+ "gte": "01/01/2012",
+ "lte": "2013",
+ "format": "dd/MM/yyyy||yyyy"
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "range" : {
+ "timestamp" : {
+ "gte": "2015-01-01 00:00:00",
+ "lte": "now",
+ "time_zone": "+01:00"
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "common": {
+ "body": {
+ "query": "this is bonsai cool",
+ "cutoff_frequency": 0.001
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "common": {
+ "body": {
+ "query": "nelly the elephant as a cartoon",
+ "cutoff_frequency": 0.001,
+ "low_freq_operator": "and"
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool": {
+ "must": [
+ { "term": { "body": "nelly"}},
+ { "term": { "body": "elephant"}},
+ { "term": { "body": "cartoon"}}
+ ],
+ "should": [
+ { "term": { "body": "the"}},
+ { "term": { "body": "as"}},
+ { "term": { "body": "a"}}
+ ]
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "common": {
+ "body": {
+ "query": "nelly the elephant as a cartoon",
+ "cutoff_frequency": 0.001,
+ "minimum_should_match": 2
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool": {
+ "must": {
+ "bool": {
+ "should": [
+ { "term": { "body": "nelly"}},
+ { "term": { "body": "elephant"}},
+ { "term": { "body": "cartoon"}}
+ ],
+ "minimum_should_match": 2
+ }
+ },
+ "should": [
+ { "term": { "body": "the"}},
+ { "term": { "body": "as"}},
+ { "term": { "body": "a"}}
+ ]
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "common": {
+ "body": {
+ "query": "nelly the elephant not as a cartoon",
+ "cutoff_frequency": 0.001,
+ "minimum_should_match": {
+ "low_freq" : 2,
+ "high_freq" : 3
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool": {
+ "must": {
+ "bool": {
+ "should": [
+ { "term": { "body": "nelly"}},
+ { "term": { "body": "elephant"}},
+ { "term": { "body": "cartoon"}}
+ ],
+ "minimum_should_match": 2
+ }
+ },
+ "should": {
+ "bool": {
+ "should": [
+ { "term": { "body": "the"}},
+ { "term": { "body": "not"}},
+ { "term": { "body": "as"}},
+ { "term": { "body": "a"}}
+ ],
+ "minimum_should_match": 3
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "common": {
+ "body": {
+ "query": "how not to be",
+ "cutoff_frequency": 0.001,
+ "minimum_should_match": {
+ "low_freq" : 2,
+ "high_freq" : 3
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool": {
+ "should": [
+ { "term": { "body": "how"}},
+ { "term": { "body": "not"}},
+ { "term": { "body": "to"}},
+ { "term": { "body": "be"}}
+ ],
+ "minimum_should_match": "3<50%"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "span_within" : {
+ "little" : {
+ "span_term" : { "field1" : "foo" }
+ },
+ "big" : {
+ "span_near" : {
+ "clauses" : [
+ { "span_term" : { "field1" : "bar" } },
+ { "span_term" : { "field1" : "baz" } }
+ ],
+ "slop" : 5,
+ "in_order" : true
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "span_near" : {
+ "clauses" : [
+ { "span_term" : { "field" : "value1" } },
+ { "span_term" : { "field" : "value2" } },
+ { "span_term" : { "field" : "value3" } }
+ ],
+ "slop" : 12,
+ "in_order" : false
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool" : {
+ "must" : {
+ "match_all" : {}
+ },
+ "filter" : {
+ "geo_distance_range" : {
+ "from" : "200km",
+ "to" : "400km",
+ "pin.location" : {
+ "lat" : 40,
+ "lon" : -70
+ }
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "simple_query_string" : {
+ "query": "\"fried eggs\" +(eggplant | potato) -frittata",
+ "analyzer": "snowball",
+ "fields": ["body^5","_all"],
+ "default_operator": "and"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "simple_query_string" : {
+ "fields" : ["content", "name.*^5"],
+ "query" : "foo bar baz"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "simple_query_string" : {
+ "query" : "foo | bar + baz*",
+ "flags" : "OR|AND|PREFIX"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "span_multi":{
+ "match":{
+ "prefix" : { "user" : { "value" : "ki" } }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "span_multi":{
+ "match":{
+ "prefix" : { "user" : { "value" : "ki", "boost" : 1.08 } }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "constant_score" : {
+ "filter" : {
+ "term" : { "user" : "kimchy"}
+ },
+ "boost" : 1.2
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "wildcard" : { "user" : "ki*y" }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "wildcard" : { "user" : { "value" : "ki*y", "boost" : 2.0 } }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "wildcard" : { "user" : { "wildcard" : "ki*y", "boost" : 2.0 } }
+ }
+}
+handle snippet
+null
+emit snippet
+body part:
+{
+ "mappings": {
+ "type1" : {
+ "properties" : {
+ "obj1" : {
+ "type" : "nested"
+ }
+ }
+ }
+ }
+}
+emit snippet
+query part: wait_for_status=yellow
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "nested" : {
+ "path" : "obj1",
+ "score_mode" : "avg",
+ "query" : {
+ "bool" : {
+ "must" : [
+ { "match" : {"obj1.name" : "blue"} },
+ { "range" : {"obj1.count" : {"gt" : 5}} }
+ ]
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "term" : { "user" : "Kimchy" }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool": {
+ "should": [
+ {
+ "term": {
+ "status": {
+ "value": "urgent",
+ "boost": 2.0
+ }
+ }
+ },
+ {
+ "term": {
+ "status": "normal"
+ }
+ }
+ ]
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "full_text": {
+ "type": "text"
+ },
+ "exact_value": {
+ "type": "keyword"
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "full_text": "Quick Foxes!",
+ "exact_value": "Quick Foxes!"
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "term": {
+ "exact_value": "Quick Foxes!"
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "query": {
+ "term": {
+ "full_text": "Quick Foxes!"
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "query": {
+ "term": {
+ "full_text": "foxes"
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "query": {
+ "match": {
+ "full_text": "Quick Foxes!"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "match" : {
+ "message" : "this is a test"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "match" : {
+ "message" : {
+ "query" : "this is a test",
+ "operator" : "and"
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "match" : {
+ "message" : {
+ "query" : "to be or not to be",
+ "operator" : "and",
+ "zero_terms_query": "all"
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "match" : {
+ "message" : {
+ "query" : "to be or not to be",
+ "cutoff_frequency" : 0.001
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool": {
+ "must": [
+ { "match": { "title": "Search" }},
+ { "match": { "content": "Elasticsearch" }}
+ ],
+ "filter": [
+ { "term": { "status": "published" }},
+ { "range": { "publish_date": { "gte": "2015-01-01" }}}
+ ]
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "ids" : {
+ "type" : "my_type",
+ "values" : ["1", "4", "100"]
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "dis_max" : {
+ "tie_breaker" : 0.7,
+ "boost" : 1.2,
+ "queries" : [
+ {
+ "term" : { "age" : 34 }
+ },
+ {
+ "term" : { "age" : 35 }
+ }
+ ]
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "match_phrase" : {
+ "message" : "this is a test"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "match_phrase" : {
+ "message" : {
+ "query" : "this is a test",
+ "analyzer" : "my_analyzer"
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool" : {
+ "must" : {
+ "script" : {
+ "script" : "doc['num1'].value > 1"
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool" : {
+ "must" : {
+ "script" : {
+ "script" : {
+ "inline" : "doc['num1'].value > param1",
+ "params" : {
+ "param1" : 5
+ }
+ }
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{ "query": {
+ "prefix" : { "user" : "ki" }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{ "query": {
+ "prefix" : { "user" : { "value" : "ki", "boost" : 2.0 } }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{ "query": {
+ "prefix" : { "user" : { "prefix" : "ki", "boost" : 2.0 } }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool" : {
+ "must" : {
+ "term" : { "user" : "kimchy" }
+ },
+ "filter": {
+ "term" : { "tag" : "tech" }
+ },
+ "must_not" : {
+ "range" : {
+ "age" : { "from" : 10, "to" : 20 }
+ }
+ },
+ "should" : [
+ { "term" : { "tag" : "wow" } },
+ { "term" : { "tag" : "elasticsearch" } }
+ ],
+ "minimum_should_match" : 1,
+ "boost" : 1.0
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool": {
+ "filter": {
+ "term": {
+ "status": "active"
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool": {
+ "must": {
+ "match_all": {}
+ },
+ "filter": {
+ "term": {
+ "status": "active"
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "constant_score": {
+ "filter": {
+ "term": {
+ "status": "active"
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "span_containing" : {
+ "little" : {
+ "span_term" : { "field1" : "foo" }
+ },
+ "big" : {
+ "span_near" : {
+ "clauses" : [
+ { "span_term" : { "field1" : "bar" } },
+ { "span_term" : { "field1" : "baz" } }
+ ],
+ "slop" : 5,
+ "in_order" : true
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "boosting" : {
+ "positive" : {
+ "term" : {
+ "field1" : "value1"
+ }
+ },
+ "negative" : {
+ "term" : {
+ "field2" : "value2"
+ }
+ },
+ "negative_boost" : 0.2
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "has_child" : {
+ "type" : "blog_tag",
+ "query" : {
+ "term" : {
+ "tag" : "something"
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "has_child" : {
+ "type" : "blog_tag",
+ "score_mode" : "min",
+ "query" : {
+ "term" : {
+ "tag" : "something"
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "has_child" : {
+ "type" : "blog_tag",
+ "score_mode" : "min",
+ "min_children": 2,
+ "max_children": 10,
+ "query" : {
+ "term" : {
+ "tag" : "something"
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "constant_score" : {
+ "filter" : {
+ "terms" : { "user" : ["kimchy", "elasticsearch"]}
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "followers" : ["1", "3"]
+}
+emit snippet
+body part:
+{
+ "user" : "1"
+}
+emit snippet
+body part:
+{
+ "query" : {
+ "terms" : {
+ "user" : {
+ "index" : "users",
+ "type" : "user",
+ "id" : "2",
+ "path" : "followers"
+ }
+ }
+ }
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "exists" : { "field" : "user" }
+ }
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool": {
+ "must_not": {
+ "exists": {
+ "field": "user"
+ }
+ }
+ }
+ }
+}
+handle snippet
+null
+emit snippet
+body part:
+{
+ "mappings" : {
+ "location": {
+ "properties": {
+ "pin": {
+ "type": "geo_point",
+ "geohash": true,
+ "geohash_prefix": true,
+ "geohash_precision": 10
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool" : {
+ "must" : {
+ "match_all" : {}
+ },
+ "filter" : {
+ "geohash_cell": {
+ "pin": {
+ "lat": 13.4080,
+ "lon": 52.5186
+ },
+ "precision": 3,
+ "neighbors": true
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "regexp":{
+ "name.first": "s.*y"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "regexp":{
+ "name.first":{
+ "value":"s.*y",
+ "boost":1.2
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "regexp":{
+ "name.first": {
+ "value": "s.*y",
+ "flags" : "INTERSECTION|COMPLEMENT|EMPTY"
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "regexp":{
+ "name.first": {
+ "value": "s.*y",
+ "flags" : "INTERSECTION|COMPLEMENT|EMPTY",
+ "max_determinized_states": 20000
+ }
+ }
+ }
+}
+handle snippet
+null
+emit snippet
+body part:
+{
+ "mappings": {
+ "blog_post": {
+ "properties": {
+ "name": {
+ "type": "keyword"
+ }
+ }
+ },
+ "blog_tag": {
+ "_parent": {
+ "type": "blog_post"
+ },
+ "_routing": {
+ "required": true
+ }
+ }
+ }
+}
+emit snippet
+query part: wait_for_status=yellow
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "parent_id" : {
+ "type" : "blog_tag",
+ "id" : "1"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "has_parent": {
+ "type": "blog_post",
+ "query": {
+ "term": {
+ "_id": "1"
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "has_parent" : {
+ "parent_type" : "blog",
+ "query" : {
+ "term" : {
+ "tag" : "something"
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "has_parent" : {
+ "parent_type" : "blog",
+ "score" : true,
+ "query" : {
+ "term" : {
+ "tag" : "something"
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "template": {
+ "inline": { "match": { "text": "{{query_string}}" }},
+ "params" : {
+ "query_string" : "all about search"
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "match": {
+ "text": "all about search"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "template": {
+ "inline": "{ \"match\": { \"text\": \"{{query_string}}\" }}",
+ "params" : {
+ "query_string" : "all about search"
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "template": {
+ "file": "my_template",
+ "params" : {
+ "query_string" : "all about search"
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "template": { "match": { "text": "{{query_string}}" }}
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "template": {
+ "id": "my_template",
+ "params" : {
+ "query_string" : "all about search"
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "span_first" : {
+ "match" : {
+ "span_term" : { "user" : "kimchy" }
+ },
+ "end" : 3
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool" : {
+ "must" : {
+ "match_all" : {}
+ },
+ "filter" : {
+ "geo_polygon" : {
+ "person.location" : {
+ "points" : [
+ {"lat" : 40, "lon" : -70},
+ {"lat" : 30, "lon" : -80},
+ {"lat" : 20, "lon" : -90}
+ ]
+ }
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool" : {
+ "must" : {
+ "match_all" : {}
+ },
+ "filter" : {
+ "geo_polygon" : {
+ "person.location" : {
+ "points" : [
+ [-70, 40],
+ [-80, 30],
+ [-90, 20]
+ ]
+ }
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool" : {
+ "must" : {
+ "match_all" : {}
+ },
+ "filter" : {
+ "geo_polygon" : {
+ "person.location" : {
+ "points" : [
+ "40, -70",
+ "30, -80",
+ "20, -90"
+ ]
+ }
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool" : {
+ "must" : {
+ "match_all" : {}
+ },
+ "filter" : {
+ "geo_polygon" : {
+ "person.location" : {
+ "points" : [
+ "drn5x1g8cu2y",
+ "30, -80",
+ "20, -90"
+ ]
+ }
+ }
+ }
+ }
+ }
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query":{
+ "bool": {
+ "must": {
+ "match_all": {}
+ },
+ "filter": {
+ "geo_shape": {
+ "location": {
+ "shape": {
+ "type": "envelope",
+ "coordinates" : [[13.0, 53.0], [14.0, 52.0]]
+ },
+ "relation": "within"
+ }
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool": {
+ "must": {
+ "match_all": {}
+ },
+ "filter": {
+ "geo_shape": {
+ "location": {
+ "indexed_shape": {
+ "id": "DEU",
+ "type": "countries",
+ "index": "shapes",
+ "path": "location"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "function_score": {
+ "query": {},
+ "boost": "5",
+ "random_score": {},
+ "boost_mode":"multiply"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "function_score": {
+ "query": {},
+ "boost": "5",
+ "functions": [
+ {
+ "filter": {},
+ "random_score": {},
+ "weight": 23
+ },
+ {
+ "filter": {},
+ "weight": 42
+ }
+ ],
+ "max_boost": 42,
+ "score_mode": "max",
+ "boost_mode": "multiply",
+ "min_score" : 42
+ }
+ }
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "function_score": {
+ "functions": [
+ {
+ "gauss": {
+ "price": {
+ "origin": "0",
+ "scale": "20"
+ }
+ }
+ },
+ {
+ "gauss": {
+ "location": {
+ "origin": "11, 12",
+ "scale": "2km"
+ }
+ }
+ }
+ ],
+ "query": {
+ "match": {
+ "properties": "balcony"
+ }
+ },
+ "score_mode": "multiply"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "span_or" : {
+ "clauses" : [
+ { "span_term" : { "field" : "value1" } },
+ { "span_term" : { "field" : "value2" } },
+ { "span_term" : { "field" : "value3" } }
+ ]
+ }
+ }
+}
+handle snippet
+null
+emit snippet
+body part:
+{
+ "mappings": {
+ "location": {
+ "properties": {
+ "pin": {
+ "properties": {
+ "location": {
+ "type": "geo_point"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "pin" : {
+ "location" : {
+ "lat" : 40.12,
+ "lon" : -71.34
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool" : {
+ "must" : {
+ "match_all" : {}
+ },
+ "filter" : {
+ "geo_bounding_box" : {
+ "pin.location" : {
+ "top_left" : {
+ "lat" : 40.73,
+ "lon" : -74.1
+ },
+ "bottom_right" : {
+ "lat" : 40.01,
+ "lon" : -71.12
+ }
+ }
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool" : {
+ "must" : {
+ "match_all" : {}
+ },
+ "filter" : {
+ "geo_bounding_box" : {
+ "pin.location" : {
+ "top_left" : {
+ "lat" : 40.73,
+ "lon" : -74.1
+ },
+ "bottom_right" : {
+ "lat" : 40.01,
+ "lon" : -71.12
+ }
+ }
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool" : {
+ "must" : {
+ "match_all" : {}
+ },
+ "filter" : {
+ "geo_bounding_box" : {
+ "pin.location" : {
+ "top_left" : [-74.1, 40.73],
+ "bottom_right" : [-71.12, 40.01]
+ }
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool" : {
+ "must" : {
+ "match_all" : {}
+ },
+ "filter" : {
+ "geo_bounding_box" : {
+ "pin.location" : {
+ "top_left" : "40.73, -74.1",
+ "bottom_right" : "40.01, -71.12"
+ }
+ }
+ }
+ }
+}
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool" : {
+ "must" : {
+ "match_all" : {}
+ },
+ "filter" : {
+ "geo_bounding_box" : {
+ "pin.location" : {
+ "top_left" : "dr5r9ydj2y73",
+ "bottom_right" : "drj7teegpus6"
+ }
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool" : {
+ "must" : {
+ "match_all" : {}
+ },
+ "filter" : {
+ "geo_bounding_box" : {
+ "pin.location" : {
+ "top" : 40.73,
+ "left" : -74.1,
+ "bottom" : 40.01,
+ "right" : -71.12
+ }
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool" : {
+ "must" : {
+ "match_all" : {}
+ },
+ "filter" : {
+ "geo_bounding_box" : {
+ "pin.location" : {
+ "top_left" : {
+ "lat" : 40.73,
+ "lon" : -74.1
+ },
+ "bottom_right" : {
+ "lat" : 40.10,
+ "lon" : -71.12
+ }
+ },
+ "type" : "indexed"
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "match_phrase_prefix" : {
+ "message" : "quick brown f"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "match_phrase_prefix" : {
+ "message" : {
+ "query" : "quick brown f",
+ "max_expansions" : 10
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "doctype": {
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ }
+ },
+ "queries": {
+ "properties": {
+ "query": {
+ "type": "percolator"
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query" : {
+ "match" : {
+ "message" : "bonsai tree"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query" : {
+ "percolate" : {
+ "field" : "query",
+ "document_type" : "doctype",
+ "document" : {
+ "message" : "A new bonsai tree in the office"
+ }
+ }
+ }
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "message" : "A new bonsai tree in the office"
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query" : {
+ "percolate" : {
+ "field": "query",
+ "document_type" : "doctype",
+ "index" : "my-index",
+ "type" : "message",
+ "id" : "1",
+ "version" : 1
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query" : {
+ "match" : {
+ "message" : "brown fox"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query" : {
+ "match" : {
+ "message" : "lazy dog"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query" : {
+ "percolate" : {
+ "field": "query",
+ "document_type" : "doctype",
+ "document" : {
+ "message" : "The quick brown fox jumps over the lazy dog"
+ }
+ }
+ },
+ "highlight": {
+ "fields": {
+ "message": {}
+ }
+ }
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "term" : {
+ "query.unknown_query" : ""
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "span_not" : {
+ "include" : {
+ "span_term" : { "field1" : "hoya" }
+ },
+ "exclude" : {
+ "span_near" : {
+ "clauses" : [
+ { "span_term" : { "field1" : "la" } },
+ { "span_term" : { "field1" : "hoya" } }
+ ],
+ "slop" : 0,
+ "in_order" : true
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "type" : {
+ "value" : "my_type"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "span_term" : { "user" : "kimchy" }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "span_term" : { "user" : { "value" : "kimchy", "boost" : 2.0 } }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "span_term" : { "user" : { "term" : "kimchy", "boost" : 2.0 } }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "fuzzy" : { "user" : "ki" }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "fuzzy" : {
+ "user" : {
+ "value" : "ki",
+ "boost" : 1.0,
+ "fuzziness" : 2,
+ "prefix_length" : 0,
+ "max_expansions": 100
+ }
+ }
+ }
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "description" : "describe pipeline",
+ "processors" : [
+ {
+ "set" : {
+ "field": "foo",
+ "value": "bar"
+ }
+ }
+ // other processors
+ ]
+}
+handle snippet
+test snippet
+emit snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "pipeline" :
+ {
+ "description": "_description",
+ "processors": [
+ {
+ "set" : {
+ "field" : "field2",
+ "value" : "_value"
+ }
+ }
+ ]
+ },
+ "docs": [
+ {
+ "_index": "index",
+ "_type": "type",
+ "_id": "id",
+ "_source": {
+ "foo": "bar"
+ }
+ },
+ {
+ "_index": "index",
+ "_type": "type",
+ "_id": "id",
+ "_source": {
+ "foo": "rab"
+ }
+ }
+ ]
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+query part: verbose
+body part:
+{
+ "pipeline" :
+ {
+ "description": "_description",
+ "processors": [
+ {
+ "set" : {
+ "field" : "field2",
+ "value" : "_value2"
+ }
+ },
+ {
+ "set" : {
+ "field" : "field3",
+ "value" : "_value3"
+ }
+ }
+ ]
+ },
+ "docs": [
+ {
+ "_index": "index",
+ "_type": "type",
+ "_id": "id",
+ "_source": {
+ "foo": "bar"
+ }
+ },
+ {
+ "_index": "index",
+ "_type": "type",
+ "_id": "id",
+ "_source": {
+ "foo": "rab"
+ }
+ }
+ ]
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+emit snippet
+query part: nodes=nodeId1,nodeId2
+emit snippet
+query part: nodes=nodeId1,nodeId2&actions=cluster:*
+handle snippet
+handle snippet
+test snippet
+emit snippet
+emit snippet
+query part: parent_task_id=parentTaskId:1
+handle snippet
+test snippet
+emit snippet
+query part: wait_for_completion=true&timeout=10s
+handle snippet
+test snippet
+emit snippet
+handle snippet
+test snippet
+emit snippet
+handle snippet
+test snippet
+emit snippet
+query part: node_id=nodeId1,nodeId2&actions=*reindex
+handle snippet
+test snippet
+emit snippet
+query part: group_by=parents
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "transient" : {
+ "cluster.routing.allocation.exclude._ip" : "10.0.0.1"
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "transient": {
+ "cluster.routing.allocation.include._ip": "192.168.2.*"
+ }
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "transient": {
+ "cluster.routing.allocation.disk.watermark.low": "80%",
+ "cluster.routing.allocation.disk.watermark.high": "50gb",
+ "cluster.info.update.interval": "1m"
+ }
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+null
+emit snippet
+query part: refresh
+body part:
+{"index":{"_id":1}}
+{"first":"johnny","last":"gaudreau","goals":[9,27,1],"assists":[17,46,0],"gp":[26,82,1]}
+{"index":{"_id":2}}
+{"first":"sean","last":"monohan","goals":[7,54,26],"assists":[11,26,13],"gp":[26,82,82]}
+{"index":{"_id":3}}
+{"first":"jiri","last":"hudler","goals":[5,34,36],"assists":[11,62,42],"gp":[24,80,79]}
+{"index":{"_id":4}}
+{"first":"micheal","last":"frolik","goals":[4,6,15],"assists":[8,23,15],"gp":[26,82,82]}
+{"index":{"_id":5}}
+{"first":"sam","last":"bennett","goals":[5,0,0],"assists":[8,1,0],"gp":[26,1,0]}
+{"index":{"_id":6}}
+{"first":"dennis","last":"wideman","goals":[0,26,15],"assists":[11,30,24],"gp":[26,81,82]}
+{"index":{"_id":7}}
+{"first":"david","last":"jones","goals":[7,19,5],"assists":[3,17,4],"gp":[26,45,34]}
+{"index":{"_id":8}}
+{"first":"tj","last":"brodie","goals":[2,14,7],"assists":[8,42,30],"gp":[26,82,82]}
+{"index":{"_id":39}}
+{"first":"mark","last":"giordano","goals":[6,30,15],"assists":[3,30,24],"gp":[26,60,63]}
+{"index":{"_id":10}}
+{"first":"mikael","last":"backlund","goals":[3,15,13],"assists":[6,24,18],"gp":[26,82,82]}
+{"index":{"_id":11}}
+{"first":"joe","last":"colborne","goals":[3,18,13],"assists":[6,20,24],"gp":[26,67,82]}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "function_score": {
+ "script_score": {
+ "script": {
+ "lang": "painless",
+ "inline": "int total = 0; for (int i = 0; i < doc['goals'].length; ++i) { total += doc['goals'][i]; } return total;"
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "match_all": {}
+ },
+ "script_fields": {
+ "total_goals": {
+ "script": {
+ "lang": "painless",
+ "inline": "int total = 0; for (int i = 0; i < doc['goals'].length; ++i) { total += doc['goals'][i]; } return total;"
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "match_all": {}
+ },
+ "sort": {
+ "_script": {
+ "type": "string",
+ "order": "asc",
+ "script": {
+ "lang": "painless",
+ "inline": "doc['first'].value + ' ' + doc['last'].value"
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "fields": [
+ "_id",
+ "_source"
+ ],
+ "query": {
+ "term": {
+ "_id": 1
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "script": {
+ "lang": "painless",
+ "inline": "ctx._source.last = params.last",
+ "params": {
+ "last": "hockey"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "script": {
+ "lang": "painless",
+ "inline": "ctx._source.last = params.last; ctx._source.nick = params.nick",
+ "params": {
+ "last": "gaudreau",
+ "nick": "hockey"
+ }
+ }
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "text": "quick brown fox",
+ "popularity": 1
+}
+emit snippet
+body part:
+{
+ "text": "quick fox",
+ "popularity": 5
+}
+emit snippet
+body part:
+{
+ "query": {
+ "function_score": {
+ "query": {
+ "match": {
+ "text": "quick brown fox"
+ }
+ },
+ "script_score": {
+ "script": {
+ "lang": "expression",
+ "inline": "_score * doc['popularity']"
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "cost_price": 100
+}
+emit snippet
+body part:
+{
+ "script_fields": {
+ "sales_price": {
+ "script": {
+ "lang": "expression",
+ "inline": "doc['cost_price'] * markup",
+ "params": {
+ "markup": 0.2
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "title": {
+ "type": "text"
+ },
+ "first_name": {
+ "type": "text",
+ "store": true
+ },
+ "last_name": {
+ "type": "text",
+ "store": true
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "title": "Mr",
+ "first_name": "Barry",
+ "last_name": "White"
+}
+emit snippet
+body part:
+{
+ "script_fields": {
+ "source": {
+ "script": {
+ "lang": "groovy",
+ "inline": "_source.title + ' ' + _source.first_name + ' ' + _source.last_name"
+ }
+ },
+ "stored_fields": {
+ "script": {
+ "lang": "groovy",
+ "inline": "_fields['first_name'].value + ' ' + _fields['last_name'].value"
+ }
+ }
+ }
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "my_field": 5
+}
+emit snippet
+body part:
+{
+ "script_fields": {
+ "my_doubled_field": {
+ "script": {
+ "lang": "expression",
+ "inline": "doc['my_field'] * multiplier",
+ "params": {
+ "multiplier": 2
+ }
+ }
+ }
+ }
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "script": "log(_score * 2) + my_modifier"
+}
+handle snippet
+test snippet
+emit snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "script": {
+ "script": {
+ "lang": "groovy",
+ "id": "calculate-score",
+ "params": {
+ "my_modifier": 2
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+catch part: /cannot set discovery.zen.minimum_master_nodes to more than the current master nodes/
+body part:
+{
+ "transient": {
+ "discovery.zen.minimum_master_nodes": 2
+ }
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+
+ - do:
+ bulk:
+ index: twitter
+ type: tweet
+ refresh: true
+ body: |
+ {"index":{"_id": "0"}}
+ {"user": "kimchy", "message": "trying out Elasticsearch", "date": "2009-11-15T14:12:12", "likes": 0}
+ {"index":{"_id": "1"}}
+ {"user": "test", "message": "some message with the number 1", "date": "2009-11-15T14:12:12", "likes": 1}
+ {"index":{"_id": "2"}}
+ {"user": "test", "message": "some message with the number 2", "date": "2009-11-15T14:12:12", "likes": 2}
+ {"index":{"_id": "3"}}
+ {"user": "test", "message": "some message with the number 3", "date": "2009-11-15T14:12:12", "likes": 3}
+ {"index":{"_id": "4"}}
+ {"user": "test", "message": "some message with the number 4", "date": "2009-11-15T14:12:12", "likes": 4}
+ {"index":{"_id": "5"}}
+ {"user": "test", "message": "some message with the number 5", "date": "2009-11-15T14:12:12", "likes": 5}
+ {"index":{"_id": "6"}}
+ {"user": "test", "message": "some message with the number 6", "date": "2009-11-15T14:12:12", "likes": 6}
+ {"index":{"_id": "7"}}
+ {"user": "test", "message": "some message with the number 7", "date": "2009-11-15T14:12:12", "likes": 7}
+ {"index":{"_id": "8"}}
+ {"user": "test", "message": "some message with the number 8", "date": "2009-11-15T14:12:12", "likes": 8}
+ {"index":{"_id": "9"}}
+ {"user": "test", "message": "some message with the number 9", "date": "2009-11-15T14:12:12", "likes": 9}
+ {"index":{"_id": "10"}}
+ {"user": "test", "message": "some message with the number 10", "date": "2009-11-15T14:12:12", "likes": 10}
+ {"index":{"_id": "11"}}
+ {"user": "test", "message": "some message with the number 11", "date": "2009-11-15T14:12:12", "likes": 11}
+ {"index":{"_id": "12"}}
+ {"user": "test", "message": "some message with the number 12", "date": "2009-11-15T14:12:12", "likes": 12}
+ {"index":{"_id": "13"}}
+ {"user": "test", "message": "some message with the number 13", "date": "2009-11-15T14:12:12", "likes": 13}
+ {"index":{"_id": "14"}}
+ {"user": "test", "message": "some message with the number 14", "date": "2009-11-15T14:12:12", "likes": 14}
+ {"index":{"_id": "15"}}
+ {"user": "test", "message": "some message with the number 15", "date": "2009-11-15T14:12:12", "likes": 15}
+ {"index":{"_id": "16"}}
+ {"user": "test", "message": "some message with the number 16", "date": "2009-11-15T14:12:12", "likes": 16}
+ {"index":{"_id": "17"}}
+ {"user": "test", "message": "some message with the number 17", "date": "2009-11-15T14:12:12", "likes": 17}
+ {"index":{"_id": "18"}}
+ {"user": "test", "message": "some message with the number 18", "date": "2009-11-15T14:12:12", "likes": 18}
+ {"index":{"_id": "19"}}
+ {"user": "test", "message": "some message with the number 19", "date": "2009-11-15T14:12:12", "likes": 19}
+ {"index":{"_id": "20"}}
+ {"user": "test", "message": "some message with the number 20", "date": "2009-11-15T14:12:12", "likes": 20}
+ {"index":{"_id": "21"}}
+ {"user": "test", "message": "some message with the number 21", "date": "2009-11-15T14:12:12", "likes": 21}
+ {"index":{"_id": "22"}}
+ {"user": "test", "message": "some message with the number 22", "date": "2009-11-15T14:12:12", "likes": 22}
+ {"index":{"_id": "23"}}
+ {"user": "test", "message": "some message with the number 23", "date": "2009-11-15T14:12:12", "likes": 23}
+ {"index":{"_id": "24"}}
+ {"user": "test", "message": "some message with the number 24", "date": "2009-11-15T14:12:12", "likes": 24}
+ {"index":{"_id": "25"}}
+ {"user": "test", "message": "some message with the number 25", "date": "2009-11-15T14:12:12", "likes": 25}
+ {"index":{"_id": "26"}}
+ {"user": "test", "message": "some message with the number 26", "date": "2009-11-15T14:12:12", "likes": 26}
+ {"index":{"_id": "27"}}
+ {"user": "test", "message": "some message with the number 27", "date": "2009-11-15T14:12:12", "likes": 27}
+ {"index":{"_id": "28"}}
+ {"user": "test", "message": "some message with the number 28", "date": "2009-11-15T14:12:12", "likes": 28}
+ {"index":{"_id": "29"}}
+ {"user": "test", "message": "some message with the number 29", "date": "2009-11-15T14:12:12", "likes": 29}
+ {"index":{"_id": "30"}}
+ {"user": "test", "message": "some message with the number 30", "date": "2009-11-15T14:12:12", "likes": 30}
+ {"index":{"_id": "31"}}
+ {"user": "test", "message": "some message with the number 31", "date": "2009-11-15T14:12:12", "likes": 31}
+ {"index":{"_id": "32"}}
+ {"user": "test", "message": "some message with the number 32", "date": "2009-11-15T14:12:12", "likes": 32}
+ {"index":{"_id": "33"}}
+ {"user": "test", "message": "some message with the number 33", "date": "2009-11-15T14:12:12", "likes": 33}
+ {"index":{"_id": "34"}}
+ {"user": "test", "message": "some message with the number 34", "date": "2009-11-15T14:12:12", "likes": 34}
+ {"index":{"_id": "35"}}
+ {"user": "test", "message": "some message with the number 35", "date": "2009-11-15T14:12:12", "likes": 35}
+ {"index":{"_id": "36"}}
+ {"user": "test", "message": "some message with the number 36", "date": "2009-11-15T14:12:12", "likes": 36}
+ {"index":{"_id": "37"}}
+ {"user": "test", "message": "some message with the number 37", "date": "2009-11-15T14:12:12", "likes": 37}
+ {"index":{"_id": "38"}}
+ {"user": "test", "message": "some message with the number 38", "date": "2009-11-15T14:12:12", "likes": 38}
+ {"index":{"_id": "39"}}
+ {"user": "test", "message": "some message with the number 39", "date": "2009-11-15T14:12:12", "likes": 39}
+ {"index":{"_id": "40"}}
+ {"user": "test", "message": "some message with the number 40", "date": "2009-11-15T14:12:12", "likes": 40}
+ {"index":{"_id": "41"}}
+ {"user": "test", "message": "some message with the number 41", "date": "2009-11-15T14:12:12", "likes": 41}
+ {"index":{"_id": "42"}}
+ {"user": "test", "message": "some message with the number 42", "date": "2009-11-15T14:12:12", "likes": 42}
+ {"index":{"_id": "43"}}
+ {"user": "test", "message": "some message with the number 43", "date": "2009-11-15T14:12:12", "likes": 43}
+ {"index":{"_id": "44"}}
+ {"user": "test", "message": "some message with the number 44", "date": "2009-11-15T14:12:12", "likes": 44}
+ {"index":{"_id": "45"}}
+ {"user": "test", "message": "some message with the number 45", "date": "2009-11-15T14:12:12", "likes": 45}
+ {"index":{"_id": "46"}}
+ {"user": "test", "message": "some message with the number 46", "date": "2009-11-15T14:12:12", "likes": 46}
+ {"index":{"_id": "47"}}
+ {"user": "test", "message": "some message with the number 47", "date": "2009-11-15T14:12:12", "likes": 47}
+ {"index":{"_id": "48"}}
+ {"user": "test", "message": "some message with the number 48", "date": "2009-11-15T14:12:12", "likes": 48}
+ {"index":{"_id": "49"}}
+ {"user": "test", "message": "some message with the number 49", "date": "2009-11-15T14:12:12", "likes": 49}
+ {"index":{"_id": "50"}}
+ {"user": "test", "message": "some message with the number 50", "date": "2009-11-15T14:12:12", "likes": 50}
+ {"index":{"_id": "51"}}
+ {"user": "test", "message": "some message with the number 51", "date": "2009-11-15T14:12:12", "likes": 51}
+ {"index":{"_id": "52"}}
+ {"user": "test", "message": "some message with the number 52", "date": "2009-11-15T14:12:12", "likes": 52}
+ {"index":{"_id": "53"}}
+ {"user": "test", "message": "some message with the number 53", "date": "2009-11-15T14:12:12", "likes": 53}
+ {"index":{"_id": "54"}}
+ {"user": "test", "message": "some message with the number 54", "date": "2009-11-15T14:12:12", "likes": 54}
+ {"index":{"_id": "55"}}
+ {"user": "test", "message": "some message with the number 55", "date": "2009-11-15T14:12:12", "likes": 55}
+ {"index":{"_id": "56"}}
+ {"user": "test", "message": "some message with the number 56", "date": "2009-11-15T14:12:12", "likes": 56}
+ {"index":{"_id": "57"}}
+ {"user": "test", "message": "some message with the number 57", "date": "2009-11-15T14:12:12", "likes": 57}
+ {"index":{"_id": "58"}}
+ {"user": "test", "message": "some message with the number 58", "date": "2009-11-15T14:12:12", "likes": 58}
+ {"index":{"_id": "59"}}
+ {"user": "test", "message": "some message with the number 59", "date": "2009-11-15T14:12:12", "likes": 59}
+ {"index":{"_id": "60"}}
+ {"user": "test", "message": "some message with the number 60", "date": "2009-11-15T14:12:12", "likes": 60}
+ {"index":{"_id": "61"}}
+ {"user": "test", "message": "some message with the number 61", "date": "2009-11-15T14:12:12", "likes": 61}
+ {"index":{"_id": "62"}}
+ {"user": "test", "message": "some message with the number 62", "date": "2009-11-15T14:12:12", "likes": 62}
+ {"index":{"_id": "63"}}
+ {"user": "test", "message": "some message with the number 63", "date": "2009-11-15T14:12:12", "likes": 63}
+ {"index":{"_id": "64"}}
+ {"user": "test", "message": "some message with the number 64", "date": "2009-11-15T14:12:12", "likes": 64}
+ {"index":{"_id": "65"}}
+ {"user": "test", "message": "some message with the number 65", "date": "2009-11-15T14:12:12", "likes": 65}
+ {"index":{"_id": "66"}}
+ {"user": "test", "message": "some message with the number 66", "date": "2009-11-15T14:12:12", "likes": 66}
+ {"index":{"_id": "67"}}
+ {"user": "test", "message": "some message with the number 67", "date": "2009-11-15T14:12:12", "likes": 67}
+ {"index":{"_id": "68"}}
+ {"user": "test", "message": "some message with the number 68", "date": "2009-11-15T14:12:12", "likes": 68}
+ {"index":{"_id": "69"}}
+ {"user": "test", "message": "some message with the number 69", "date": "2009-11-15T14:12:12", "likes": 69}
+ {"index":{"_id": "70"}}
+ {"user": "test", "message": "some message with the number 70", "date": "2009-11-15T14:12:12", "likes": 70}
+ {"index":{"_id": "71"}}
+ {"user": "test", "message": "some message with the number 71", "date": "2009-11-15T14:12:12", "likes": 71}
+ {"index":{"_id": "72"}}
+ {"user": "test", "message": "some message with the number 72", "date": "2009-11-15T14:12:12", "likes": 72}
+ {"index":{"_id": "73"}}
+ {"user": "test", "message": "some message with the number 73", "date": "2009-11-15T14:12:12", "likes": 73}
+ {"index":{"_id": "74"}}
+ {"user": "test", "message": "some message with the number 74", "date": "2009-11-15T14:12:12", "likes": 74}
+ {"index":{"_id": "75"}}
+ {"user": "test", "message": "some message with the number 75", "date": "2009-11-15T14:12:12", "likes": 75}
+ {"index":{"_id": "76"}}
+ {"user": "test", "message": "some message with the number 76", "date": "2009-11-15T14:12:12", "likes": 76}
+ {"index":{"_id": "77"}}
+ {"user": "test", "message": "some message with the number 77", "date": "2009-11-15T14:12:12", "likes": 77}
+ {"index":{"_id": "78"}}
+ {"user": "test", "message": "some message with the number 78", "date": "2009-11-15T14:12:12", "likes": 78}
+ {"index":{"_id": "79"}}
+ {"user": "test", "message": "some message with the number 79", "date": "2009-11-15T14:12:12", "likes": 79}
+ {"index":{"_id": "80"}}
+ {"user": "test", "message": "some message with the number 80", "date": "2009-11-15T14:12:12", "likes": 80}
+ {"index":{"_id": "81"}}
+ {"user": "test", "message": "some message with the number 81", "date": "2009-11-15T14:12:12", "likes": 81}
+ {"index":{"_id": "82"}}
+ {"user": "test", "message": "some message with the number 82", "date": "2009-11-15T14:12:12", "likes": 82}
+ {"index":{"_id": "83"}}
+ {"user": "test", "message": "some message with the number 83", "date": "2009-11-15T14:12:12", "likes": 83}
+ {"index":{"_id": "84"}}
+ {"user": "test", "message": "some message with the number 84", "date": "2009-11-15T14:12:12", "likes": 84}
+ {"index":{"_id": "85"}}
+ {"user": "test", "message": "some message with the number 85", "date": "2009-11-15T14:12:12", "likes": 85}
+ {"index":{"_id": "86"}}
+ {"user": "test", "message": "some message with the number 86", "date": "2009-11-15T14:12:12", "likes": 86}
+ {"index":{"_id": "87"}}
+ {"user": "test", "message": "some message with the number 87", "date": "2009-11-15T14:12:12", "likes": 87}
+ {"index":{"_id": "88"}}
+ {"user": "test", "message": "some message with the number 88", "date": "2009-11-15T14:12:12", "likes": 88}
+ {"index":{"_id": "89"}}
+ {"user": "test", "message": "some message with the number 89", "date": "2009-11-15T14:12:12", "likes": 89}
+ {"index":{"_id": "90"}}
+ {"user": "test", "message": "some message with the number 90", "date": "2009-11-15T14:12:12", "likes": 90}
+ {"index":{"_id": "91"}}
+ {"user": "test", "message": "some message with the number 91", "date": "2009-11-15T14:12:12", "likes": 91}
+ {"index":{"_id": "92"}}
+ {"user": "test", "message": "some message with the number 92", "date": "2009-11-15T14:12:12", "likes": 92}
+ {"index":{"_id": "93"}}
+ {"user": "test", "message": "some message with the number 93", "date": "2009-11-15T14:12:12", "likes": 93}
+ {"index":{"_id": "94"}}
+ {"user": "test", "message": "some message with the number 94", "date": "2009-11-15T14:12:12", "likes": 94}
+ {"index":{"_id": "95"}}
+ {"user": "test", "message": "some message with the number 95", "date": "2009-11-15T14:12:12", "likes": 95}
+ {"index":{"_id": "96"}}
+ {"user": "test", "message": "some message with the number 96", "date": "2009-11-15T14:12:12", "likes": 96}
+ {"index":{"_id": "97"}}
+ {"user": "test", "message": "some message with the number 97", "date": "2009-11-15T14:12:12", "likes": 97}
+ {"index":{"_id": "98"}}
+ {"user": "test", "message": "some message with the number 98", "date": "2009-11-15T14:12:12", "likes": 98}
+ {"index":{"_id": "99"}}
+ {"user": "test", "message": "some message with the number 99", "date": "2009-11-15T14:12:12", "likes": 99}
+ {"index":{"_id": "100"}}
+ {"user": "test", "message": "some message with the number 100", "date": "2009-11-15T14:12:12", "likes": 100}
+ {"index":{"_id": "101"}}
+ {"user": "test", "message": "some message with the number 101", "date": "2009-11-15T14:12:12", "likes": 101}
+ {"index":{"_id": "102"}}
+ {"user": "test", "message": "some message with the number 102", "date": "2009-11-15T14:12:12", "likes": 102}
+ {"index":{"_id": "103"}}
+ {"user": "test", "message": "some message with the number 103", "date": "2009-11-15T14:12:12", "likes": 103}
+ {"index":{"_id": "104"}}
+ {"user": "test", "message": "some message with the number 104", "date": "2009-11-15T14:12:12", "likes": 104}
+ {"index":{"_id": "105"}}
+ {"user": "test", "message": "some message with the number 105", "date": "2009-11-15T14:12:12", "likes": 105}
+ {"index":{"_id": "106"}}
+ {"user": "test", "message": "some message with the number 106", "date": "2009-11-15T14:12:12", "likes": 106}
+ {"index":{"_id": "107"}}
+ {"user": "test", "message": "some message with the number 107", "date": "2009-11-15T14:12:12", "likes": 107}
+ {"index":{"_id": "108"}}
+ {"user": "test", "message": "some message with the number 108", "date": "2009-11-15T14:12:12", "likes": 108}
+ {"index":{"_id": "109"}}
+ {"user": "test", "message": "some message with the number 109", "date": "2009-11-15T14:12:12", "likes": 109}
+ {"index":{"_id": "110"}}
+ {"user": "test", "message": "some message with the number 110", "date": "2009-11-15T14:12:12", "likes": 110}
+ {"index":{"_id": "111"}}
+ {"user": "test", "message": "some message with the number 111", "date": "2009-11-15T14:12:12", "likes": 111}
+ {"index":{"_id": "112"}}
+ {"user": "test", "message": "some message with the number 112", "date": "2009-11-15T14:12:12", "likes": 112}
+ {"index":{"_id": "113"}}
+ {"user": "test", "message": "some message with the number 113", "date": "2009-11-15T14:12:12", "likes": 113}
+ {"index":{"_id": "114"}}
+ {"user": "test", "message": "some message with the number 114", "date": "2009-11-15T14:12:12", "likes": 114}
+ {"index":{"_id": "115"}}
+ {"user": "test", "message": "some message with the number 115", "date": "2009-11-15T14:12:12", "likes": 115}
+ {"index":{"_id": "116"}}
+ {"user": "test", "message": "some message with the number 116", "date": "2009-11-15T14:12:12", "likes": 116}
+ {"index":{"_id": "117"}}
+ {"user": "test", "message": "some message with the number 117", "date": "2009-11-15T14:12:12", "likes": 117}
+ {"index":{"_id": "118"}}
+ {"user": "test", "message": "some message with the number 118", "date": "2009-11-15T14:12:12", "likes": 118}
+ {"index":{"_id": "119"}}
+ {"user": "test", "message": "some message with the number 119", "date": "2009-11-15T14:12:12", "likes": 119}
+emit snippet
+body part:
+{
+ "query": {
+ "match": {
+ "message": "some message"
+ }
+ }
+}
+handle snippet
+handle snippet
+test snippet
+
+ - do:
+ bulk:
+ index: twitter
+ type: tweet
+ refresh: true
+ body: |
+ {"index":{"_id": "0"}}
+ {"user": "kimchy", "message": "trying out Elasticsearch", "date": "2009-11-15T14:12:12", "likes": 0}
+ {"index":{"_id": "1"}}
+ {"user": "test", "message": "some message with the number 1", "date": "2009-11-15T14:12:12", "likes": 1}
+ {"index":{"_id": "2"}}
+ {"user": "test", "message": "some message with the number 2", "date": "2009-11-15T14:12:12", "likes": 2}
+ {"index":{"_id": "3"}}
+ {"user": "test", "message": "some message with the number 3", "date": "2009-11-15T14:12:12", "likes": 3}
+ {"index":{"_id": "4"}}
+ {"user": "test", "message": "some message with the number 4", "date": "2009-11-15T14:12:12", "likes": 4}
+emit snippet
+query part: conflicts=proceed
+body part:
+{
+ "query": {
+ "match_all": {}
+ }
+}
+handle snippet
+test snippet
+emit snippet
+emit snippet
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+body part:
+{
+ "query": {
+ "match_all": {}
+ }
+}
+handle snippet
+test snippet
+
+ - do:
+ bulk:
+ index: twitter
+ type: tweet
+ refresh: true
+ body: |
+ {"index":{"_id": "0"}}
+ {"user": "kimchy", "message": "trying out Elasticsearch", "date": "2009-11-15T14:12:12", "likes": 0}
+ {"index":{"_id": "1"}}
+ {"user": "test", "message": "some message with the number 1", "date": "2009-11-15T14:12:12", "likes": 1}
+ {"index":{"_id": "2"}}
+ {"user": "test", "message": "some message with the number 2", "date": "2009-11-15T14:12:12", "likes": 2}
+ {"index":{"_id": "3"}}
+ {"user": "test", "message": "some message with the number 3", "date": "2009-11-15T14:12:12", "likes": 3}
+ {"index":{"_id": "4"}}
+ {"user": "test", "message": "some message with the number 4", "date": "2009-11-15T14:12:12", "likes": 4}
+emit snippet
+query part: routing=1
+body part:
+{
+ "query": {
+ "range" : {
+ "age" : {
+ "gte" : 10
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+
+ - do:
+ bulk:
+ index: twitter
+ type: tweet
+ refresh: true
+ body: |
+ {"index":{"_id": "0"}}
+ {"user": "kimchy", "message": "trying out Elasticsearch", "date": "2009-11-15T14:12:12", "likes": 0}
+ {"index":{"_id": "1"}}
+ {"user": "test", "message": "some message with the number 1", "date": "2009-11-15T14:12:12", "likes": 1}
+ {"index":{"_id": "2"}}
+ {"user": "test", "message": "some message with the number 2", "date": "2009-11-15T14:12:12", "likes": 2}
+ {"index":{"_id": "3"}}
+ {"user": "test", "message": "some message with the number 3", "date": "2009-11-15T14:12:12", "likes": 3}
+ {"index":{"_id": "4"}}
+ {"user": "test", "message": "some message with the number 4", "date": "2009-11-15T14:12:12", "likes": 4}
+emit snippet
+query part: scroll_size=5000
+body part:
+{
+ "query": {
+ "term": {
+ "user": "kimchy"
+ }
+ }
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+query part: detailed=true&action=*/delete/byquery
+handle snippet
+handle snippet
+test snippet
+emit snippet
+handle snippet
+test snippet
+emit snippet
+query part: requests_per_second=unlimited
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "user" : "kimchy",
+ "post_date" : "2009-11-15T14:12:12",
+ "message" : "trying out Elasticsearch"
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+catch part: conflict
+query part: version=2
+body part:
+{
+ "message" : "elasticsearch now has versioning support, double cool!"
+}
+handle snippet
+test snippet
+emit snippet
+query part: op_type=create
+body part:
+{
+ "user" : "kimchy",
+ "post_date" : "2009-11-15T14:12:12",
+ "message" : "trying out Elasticsearch"
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "user" : "kimchy",
+ "post_date" : "2009-11-15T14:12:12",
+ "message" : "trying out Elasticsearch"
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "user" : "kimchy",
+ "post_date" : "2009-11-15T14:12:12",
+ "message" : "trying out Elasticsearch"
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+query part: routing=kimchy
+body part:
+{
+ "user" : "kimchy",
+ "post_date" : "2009-11-15T14:12:12",
+ "message" : "trying out Elasticsearch"
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "tag_parent": {},
+ "blog_tag": {
+ "_parent": {
+ "type": "tag_parent"
+ }
+ }
+ }
+}
+emit snippet
+query part: parent=1111
+body part:
+{
+ "tag" : "something"
+}
+handle snippet
+test snippet
+emit snippet
+query part: timestamp=2009-11-15T14:12:12
+body part:
+{
+ "user" : "kimchy",
+ "message" : "trying out Elasticsearch"
+}
+handle snippet
+test snippet
+emit snippet
+query part: ttl=86400000ms
+body part:
+{
+ "user": "kimchy",
+ "message": "Trying out elasticsearch, so far so good?"
+}
+handle snippet
+test snippet
+emit snippet
+query part: ttl=1d
+body part:
+{
+ "user": "kimchy",
+ "message": "Trying out elasticsearch, so far so good?"
+}
+handle snippet
+test snippet
+emit snippet
+query part: timeout=5m
+body part:
+{
+ "user" : "kimchy",
+ "post_date" : "2009-11-15T14:12:12",
+ "message" : "trying out Elasticsearch"
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+
+ - do:
+ bulk:
+ index: twitter
+ type: tweet
+ refresh: true
+ body: |
+ {"index":{"_id": "0"}}
+ {"user": "kimchy", "message": "trying out Elasticsearch", "date": "2009-11-15T14:12:12", "likes": 0}
+ {"index":{"_id": "1"}}
+ {"user": "test", "message": "some message with the number 1", "date": "2009-11-15T14:12:12", "likes": 1}
+ {"index":{"_id": "2"}}
+ {"user": "test", "message": "some message with the number 2", "date": "2009-11-15T14:12:12", "likes": 2}
+ {"index":{"_id": "3"}}
+ {"user": "test", "message": "some message with the number 3", "date": "2009-11-15T14:12:12", "likes": 3}
+ {"index":{"_id": "4"}}
+ {"user": "test", "message": "some message with the number 4", "date": "2009-11-15T14:12:12", "likes": 4}
+ {"index":{"_id": "5"}}
+ {"user": "test", "message": "some message with the number 5", "date": "2009-11-15T14:12:12", "likes": 5}
+ {"index":{"_id": "6"}}
+ {"user": "test", "message": "some message with the number 6", "date": "2009-11-15T14:12:12", "likes": 6}
+ {"index":{"_id": "7"}}
+ {"user": "test", "message": "some message with the number 7", "date": "2009-11-15T14:12:12", "likes": 7}
+ {"index":{"_id": "8"}}
+ {"user": "test", "message": "some message with the number 8", "date": "2009-11-15T14:12:12", "likes": 8}
+ {"index":{"_id": "9"}}
+ {"user": "test", "message": "some message with the number 9", "date": "2009-11-15T14:12:12", "likes": 9}
+ {"index":{"_id": "10"}}
+ {"user": "test", "message": "some message with the number 10", "date": "2009-11-15T14:12:12", "likes": 10}
+ {"index":{"_id": "11"}}
+ {"user": "test", "message": "some message with the number 11", "date": "2009-11-15T14:12:12", "likes": 11}
+ {"index":{"_id": "12"}}
+ {"user": "test", "message": "some message with the number 12", "date": "2009-11-15T14:12:12", "likes": 12}
+ {"index":{"_id": "13"}}
+ {"user": "test", "message": "some message with the number 13", "date": "2009-11-15T14:12:12", "likes": 13}
+ {"index":{"_id": "14"}}
+ {"user": "test", "message": "some message with the number 14", "date": "2009-11-15T14:12:12", "likes": 14}
+ {"index":{"_id": "15"}}
+ {"user": "test", "message": "some message with the number 15", "date": "2009-11-15T14:12:12", "likes": 15}
+ {"index":{"_id": "16"}}
+ {"user": "test", "message": "some message with the number 16", "date": "2009-11-15T14:12:12", "likes": 16}
+ {"index":{"_id": "17"}}
+ {"user": "test", "message": "some message with the number 17", "date": "2009-11-15T14:12:12", "likes": 17}
+ {"index":{"_id": "18"}}
+ {"user": "test", "message": "some message with the number 18", "date": "2009-11-15T14:12:12", "likes": 18}
+ {"index":{"_id": "19"}}
+ {"user": "test", "message": "some message with the number 19", "date": "2009-11-15T14:12:12", "likes": 19}
+ {"index":{"_id": "20"}}
+ {"user": "test", "message": "some message with the number 20", "date": "2009-11-15T14:12:12", "likes": 20}
+ {"index":{"_id": "21"}}
+ {"user": "test", "message": "some message with the number 21", "date": "2009-11-15T14:12:12", "likes": 21}
+ {"index":{"_id": "22"}}
+ {"user": "test", "message": "some message with the number 22", "date": "2009-11-15T14:12:12", "likes": 22}
+ {"index":{"_id": "23"}}
+ {"user": "test", "message": "some message with the number 23", "date": "2009-11-15T14:12:12", "likes": 23}
+ {"index":{"_id": "24"}}
+ {"user": "test", "message": "some message with the number 24", "date": "2009-11-15T14:12:12", "likes": 24}
+ {"index":{"_id": "25"}}
+ {"user": "test", "message": "some message with the number 25", "date": "2009-11-15T14:12:12", "likes": 25}
+ {"index":{"_id": "26"}}
+ {"user": "test", "message": "some message with the number 26", "date": "2009-11-15T14:12:12", "likes": 26}
+ {"index":{"_id": "27"}}
+ {"user": "test", "message": "some message with the number 27", "date": "2009-11-15T14:12:12", "likes": 27}
+ {"index":{"_id": "28"}}
+ {"user": "test", "message": "some message with the number 28", "date": "2009-11-15T14:12:12", "likes": 28}
+ {"index":{"_id": "29"}}
+ {"user": "test", "message": "some message with the number 29", "date": "2009-11-15T14:12:12", "likes": 29}
+ {"index":{"_id": "30"}}
+ {"user": "test", "message": "some message with the number 30", "date": "2009-11-15T14:12:12", "likes": 30}
+ {"index":{"_id": "31"}}
+ {"user": "test", "message": "some message with the number 31", "date": "2009-11-15T14:12:12", "likes": 31}
+ {"index":{"_id": "32"}}
+ {"user": "test", "message": "some message with the number 32", "date": "2009-11-15T14:12:12", "likes": 32}
+ {"index":{"_id": "33"}}
+ {"user": "test", "message": "some message with the number 33", "date": "2009-11-15T14:12:12", "likes": 33}
+ {"index":{"_id": "34"}}
+ {"user": "test", "message": "some message with the number 34", "date": "2009-11-15T14:12:12", "likes": 34}
+ {"index":{"_id": "35"}}
+ {"user": "test", "message": "some message with the number 35", "date": "2009-11-15T14:12:12", "likes": 35}
+ {"index":{"_id": "36"}}
+ {"user": "test", "message": "some message with the number 36", "date": "2009-11-15T14:12:12", "likes": 36}
+ {"index":{"_id": "37"}}
+ {"user": "test", "message": "some message with the number 37", "date": "2009-11-15T14:12:12", "likes": 37}
+ {"index":{"_id": "38"}}
+ {"user": "test", "message": "some message with the number 38", "date": "2009-11-15T14:12:12", "likes": 38}
+ {"index":{"_id": "39"}}
+ {"user": "test", "message": "some message with the number 39", "date": "2009-11-15T14:12:12", "likes": 39}
+ {"index":{"_id": "40"}}
+ {"user": "test", "message": "some message with the number 40", "date": "2009-11-15T14:12:12", "likes": 40}
+ {"index":{"_id": "41"}}
+ {"user": "test", "message": "some message with the number 41", "date": "2009-11-15T14:12:12", "likes": 41}
+ {"index":{"_id": "42"}}
+ {"user": "test", "message": "some message with the number 42", "date": "2009-11-15T14:12:12", "likes": 42}
+ {"index":{"_id": "43"}}
+ {"user": "test", "message": "some message with the number 43", "date": "2009-11-15T14:12:12", "likes": 43}
+ {"index":{"_id": "44"}}
+ {"user": "test", "message": "some message with the number 44", "date": "2009-11-15T14:12:12", "likes": 44}
+ {"index":{"_id": "45"}}
+ {"user": "test", "message": "some message with the number 45", "date": "2009-11-15T14:12:12", "likes": 45}
+ {"index":{"_id": "46"}}
+ {"user": "test", "message": "some message with the number 46", "date": "2009-11-15T14:12:12", "likes": 46}
+ {"index":{"_id": "47"}}
+ {"user": "test", "message": "some message with the number 47", "date": "2009-11-15T14:12:12", "likes": 47}
+ {"index":{"_id": "48"}}
+ {"user": "test", "message": "some message with the number 48", "date": "2009-11-15T14:12:12", "likes": 48}
+ {"index":{"_id": "49"}}
+ {"user": "test", "message": "some message with the number 49", "date": "2009-11-15T14:12:12", "likes": 49}
+ {"index":{"_id": "50"}}
+ {"user": "test", "message": "some message with the number 50", "date": "2009-11-15T14:12:12", "likes": 50}
+ {"index":{"_id": "51"}}
+ {"user": "test", "message": "some message with the number 51", "date": "2009-11-15T14:12:12", "likes": 51}
+ {"index":{"_id": "52"}}
+ {"user": "test", "message": "some message with the number 52", "date": "2009-11-15T14:12:12", "likes": 52}
+ {"index":{"_id": "53"}}
+ {"user": "test", "message": "some message with the number 53", "date": "2009-11-15T14:12:12", "likes": 53}
+ {"index":{"_id": "54"}}
+ {"user": "test", "message": "some message with the number 54", "date": "2009-11-15T14:12:12", "likes": 54}
+ {"index":{"_id": "55"}}
+ {"user": "test", "message": "some message with the number 55", "date": "2009-11-15T14:12:12", "likes": 55}
+ {"index":{"_id": "56"}}
+ {"user": "test", "message": "some message with the number 56", "date": "2009-11-15T14:12:12", "likes": 56}
+ {"index":{"_id": "57"}}
+ {"user": "test", "message": "some message with the number 57", "date": "2009-11-15T14:12:12", "likes": 57}
+ {"index":{"_id": "58"}}
+ {"user": "test", "message": "some message with the number 58", "date": "2009-11-15T14:12:12", "likes": 58}
+ {"index":{"_id": "59"}}
+ {"user": "test", "message": "some message with the number 59", "date": "2009-11-15T14:12:12", "likes": 59}
+ {"index":{"_id": "60"}}
+ {"user": "test", "message": "some message with the number 60", "date": "2009-11-15T14:12:12", "likes": 60}
+ {"index":{"_id": "61"}}
+ {"user": "test", "message": "some message with the number 61", "date": "2009-11-15T14:12:12", "likes": 61}
+ {"index":{"_id": "62"}}
+ {"user": "test", "message": "some message with the number 62", "date": "2009-11-15T14:12:12", "likes": 62}
+ {"index":{"_id": "63"}}
+ {"user": "test", "message": "some message with the number 63", "date": "2009-11-15T14:12:12", "likes": 63}
+ {"index":{"_id": "64"}}
+ {"user": "test", "message": "some message with the number 64", "date": "2009-11-15T14:12:12", "likes": 64}
+ {"index":{"_id": "65"}}
+ {"user": "test", "message": "some message with the number 65", "date": "2009-11-15T14:12:12", "likes": 65}
+ {"index":{"_id": "66"}}
+ {"user": "test", "message": "some message with the number 66", "date": "2009-11-15T14:12:12", "likes": 66}
+ {"index":{"_id": "67"}}
+ {"user": "test", "message": "some message with the number 67", "date": "2009-11-15T14:12:12", "likes": 67}
+ {"index":{"_id": "68"}}
+ {"user": "test", "message": "some message with the number 68", "date": "2009-11-15T14:12:12", "likes": 68}
+ {"index":{"_id": "69"}}
+ {"user": "test", "message": "some message with the number 69", "date": "2009-11-15T14:12:12", "likes": 69}
+ {"index":{"_id": "70"}}
+ {"user": "test", "message": "some message with the number 70", "date": "2009-11-15T14:12:12", "likes": 70}
+ {"index":{"_id": "71"}}
+ {"user": "test", "message": "some message with the number 71", "date": "2009-11-15T14:12:12", "likes": 71}
+ {"index":{"_id": "72"}}
+ {"user": "test", "message": "some message with the number 72", "date": "2009-11-15T14:12:12", "likes": 72}
+ {"index":{"_id": "73"}}
+ {"user": "test", "message": "some message with the number 73", "date": "2009-11-15T14:12:12", "likes": 73}
+ {"index":{"_id": "74"}}
+ {"user": "test", "message": "some message with the number 74", "date": "2009-11-15T14:12:12", "likes": 74}
+ {"index":{"_id": "75"}}
+ {"user": "test", "message": "some message with the number 75", "date": "2009-11-15T14:12:12", "likes": 75}
+ {"index":{"_id": "76"}}
+ {"user": "test", "message": "some message with the number 76", "date": "2009-11-15T14:12:12", "likes": 76}
+ {"index":{"_id": "77"}}
+ {"user": "test", "message": "some message with the number 77", "date": "2009-11-15T14:12:12", "likes": 77}
+ {"index":{"_id": "78"}}
+ {"user": "test", "message": "some message with the number 78", "date": "2009-11-15T14:12:12", "likes": 78}
+ {"index":{"_id": "79"}}
+ {"user": "test", "message": "some message with the number 79", "date": "2009-11-15T14:12:12", "likes": 79}
+ {"index":{"_id": "80"}}
+ {"user": "test", "message": "some message with the number 80", "date": "2009-11-15T14:12:12", "likes": 80}
+ {"index":{"_id": "81"}}
+ {"user": "test", "message": "some message with the number 81", "date": "2009-11-15T14:12:12", "likes": 81}
+ {"index":{"_id": "82"}}
+ {"user": "test", "message": "some message with the number 82", "date": "2009-11-15T14:12:12", "likes": 82}
+ {"index":{"_id": "83"}}
+ {"user": "test", "message": "some message with the number 83", "date": "2009-11-15T14:12:12", "likes": 83}
+ {"index":{"_id": "84"}}
+ {"user": "test", "message": "some message with the number 84", "date": "2009-11-15T14:12:12", "likes": 84}
+ {"index":{"_id": "85"}}
+ {"user": "test", "message": "some message with the number 85", "date": "2009-11-15T14:12:12", "likes": 85}
+ {"index":{"_id": "86"}}
+ {"user": "test", "message": "some message with the number 86", "date": "2009-11-15T14:12:12", "likes": 86}
+ {"index":{"_id": "87"}}
+ {"user": "test", "message": "some message with the number 87", "date": "2009-11-15T14:12:12", "likes": 87}
+ {"index":{"_id": "88"}}
+ {"user": "test", "message": "some message with the number 88", "date": "2009-11-15T14:12:12", "likes": 88}
+ {"index":{"_id": "89"}}
+ {"user": "test", "message": "some message with the number 89", "date": "2009-11-15T14:12:12", "likes": 89}
+ {"index":{"_id": "90"}}
+ {"user": "test", "message": "some message with the number 90", "date": "2009-11-15T14:12:12", "likes": 90}
+ {"index":{"_id": "91"}}
+ {"user": "test", "message": "some message with the number 91", "date": "2009-11-15T14:12:12", "likes": 91}
+ {"index":{"_id": "92"}}
+ {"user": "test", "message": "some message with the number 92", "date": "2009-11-15T14:12:12", "likes": 92}
+ {"index":{"_id": "93"}}
+ {"user": "test", "message": "some message with the number 93", "date": "2009-11-15T14:12:12", "likes": 93}
+ {"index":{"_id": "94"}}
+ {"user": "test", "message": "some message with the number 94", "date": "2009-11-15T14:12:12", "likes": 94}
+ {"index":{"_id": "95"}}
+ {"user": "test", "message": "some message with the number 95", "date": "2009-11-15T14:12:12", "likes": 95}
+ {"index":{"_id": "96"}}
+ {"user": "test", "message": "some message with the number 96", "date": "2009-11-15T14:12:12", "likes": 96}
+ {"index":{"_id": "97"}}
+ {"user": "test", "message": "some message with the number 97", "date": "2009-11-15T14:12:12", "likes": 97}
+ {"index":{"_id": "98"}}
+ {"user": "test", "message": "some message with the number 98", "date": "2009-11-15T14:12:12", "likes": 98}
+ {"index":{"_id": "99"}}
+ {"user": "test", "message": "some message with the number 99", "date": "2009-11-15T14:12:12", "likes": 99}
+ {"index":{"_id": "100"}}
+ {"user": "test", "message": "some message with the number 100", "date": "2009-11-15T14:12:12", "likes": 100}
+ {"index":{"_id": "101"}}
+ {"user": "test", "message": "some message with the number 101", "date": "2009-11-15T14:12:12", "likes": 101}
+ {"index":{"_id": "102"}}
+ {"user": "test", "message": "some message with the number 102", "date": "2009-11-15T14:12:12", "likes": 102}
+ {"index":{"_id": "103"}}
+ {"user": "test", "message": "some message with the number 103", "date": "2009-11-15T14:12:12", "likes": 103}
+ {"index":{"_id": "104"}}
+ {"user": "test", "message": "some message with the number 104", "date": "2009-11-15T14:12:12", "likes": 104}
+ {"index":{"_id": "105"}}
+ {"user": "test", "message": "some message with the number 105", "date": "2009-11-15T14:12:12", "likes": 105}
+ {"index":{"_id": "106"}}
+ {"user": "test", "message": "some message with the number 106", "date": "2009-11-15T14:12:12", "likes": 106}
+ {"index":{"_id": "107"}}
+ {"user": "test", "message": "some message with the number 107", "date": "2009-11-15T14:12:12", "likes": 107}
+ {"index":{"_id": "108"}}
+ {"user": "test", "message": "some message with the number 108", "date": "2009-11-15T14:12:12", "likes": 108}
+ {"index":{"_id": "109"}}
+ {"user": "test", "message": "some message with the number 109", "date": "2009-11-15T14:12:12", "likes": 109}
+ {"index":{"_id": "110"}}
+ {"user": "test", "message": "some message with the number 110", "date": "2009-11-15T14:12:12", "likes": 110}
+ {"index":{"_id": "111"}}
+ {"user": "test", "message": "some message with the number 111", "date": "2009-11-15T14:12:12", "likes": 111}
+ {"index":{"_id": "112"}}
+ {"user": "test", "message": "some message with the number 112", "date": "2009-11-15T14:12:12", "likes": 112}
+ {"index":{"_id": "113"}}
+ {"user": "test", "message": "some message with the number 113", "date": "2009-11-15T14:12:12", "likes": 113}
+ {"index":{"_id": "114"}}
+ {"user": "test", "message": "some message with the number 114", "date": "2009-11-15T14:12:12", "likes": 114}
+ {"index":{"_id": "115"}}
+ {"user": "test", "message": "some message with the number 115", "date": "2009-11-15T14:12:12", "likes": 115}
+ {"index":{"_id": "116"}}
+ {"user": "test", "message": "some message with the number 116", "date": "2009-11-15T14:12:12", "likes": 116}
+ {"index":{"_id": "117"}}
+ {"user": "test", "message": "some message with the number 117", "date": "2009-11-15T14:12:12", "likes": 117}
+ {"index":{"_id": "118"}}
+ {"user": "test", "message": "some message with the number 118", "date": "2009-11-15T14:12:12", "likes": 118}
+ {"index":{"_id": "119"}}
+ {"user": "test", "message": "some message with the number 119", "date": "2009-11-15T14:12:12", "likes": 119}
+emit snippet
+query part: conflicts=proceed
+handle snippet
+handle snippet
+test snippet
+
+ - do:
+ bulk:
+ index: twitter
+ type: tweet
+ refresh: true
+ body: |
+ {"index":{"_id": "0"}}
+ {"user": "kimchy", "message": "trying out Elasticsearch", "date": "2009-11-15T14:12:12", "likes": 0}
+ {"index":{"_id": "1"}}
+ {"user": "test", "message": "some message with the number 1", "date": "2009-11-15T14:12:12", "likes": 1}
+ {"index":{"_id": "2"}}
+ {"user": "test", "message": "some message with the number 2", "date": "2009-11-15T14:12:12", "likes": 2}
+ {"index":{"_id": "3"}}
+ {"user": "test", "message": "some message with the number 3", "date": "2009-11-15T14:12:12", "likes": 3}
+ {"index":{"_id": "4"}}
+ {"user": "test", "message": "some message with the number 4", "date": "2009-11-15T14:12:12", "likes": 4}
+emit snippet
+query part: conflicts=proceed
+handle snippet
+test snippet
+
+ - do:
+ bulk:
+ index: twitter
+ type: tweet
+ refresh: true
+ body: |
+ {"index":{"_id": "0"}}
+ {"user": "kimchy", "message": "trying out Elasticsearch", "date": "2009-11-15T14:12:12", "likes": 0}
+ {"index":{"_id": "1"}}
+ {"user": "test", "message": "some message with the number 1", "date": "2009-11-15T14:12:12", "likes": 1}
+ {"index":{"_id": "2"}}
+ {"user": "test", "message": "some message with the number 2", "date": "2009-11-15T14:12:12", "likes": 2}
+ {"index":{"_id": "3"}}
+ {"user": "test", "message": "some message with the number 3", "date": "2009-11-15T14:12:12", "likes": 3}
+ {"index":{"_id": "4"}}
+ {"user": "test", "message": "some message with the number 4", "date": "2009-11-15T14:12:12", "likes": 4}
+emit snippet
+query part: conflicts=proceed
+body part:
+{
+ "query": {
+ "term": {
+ "user": "kimchy"
+ }
+ }
+}
+handle snippet
+test snippet
+
+ - do:
+ bulk:
+ index: twitter
+ type: tweet
+ refresh: true
+ body: |
+ {"index":{"_id": "0"}}
+ {"user": "kimchy", "message": "trying out Elasticsearch", "date": "2009-11-15T14:12:12", "likes": 0}
+ {"index":{"_id": "1"}}
+ {"user": "test", "message": "some message with the number 1", "date": "2009-11-15T14:12:12", "likes": 1}
+ {"index":{"_id": "2"}}
+ {"user": "test", "message": "some message with the number 2", "date": "2009-11-15T14:12:12", "likes": 2}
+ {"index":{"_id": "3"}}
+ {"user": "test", "message": "some message with the number 3", "date": "2009-11-15T14:12:12", "likes": 3}
+ {"index":{"_id": "4"}}
+ {"user": "test", "message": "some message with the number 4", "date": "2009-11-15T14:12:12", "likes": 4}
+emit snippet
+body part:
+{
+ "script": {
+ "inline": "ctx._source.likes++"
+ },
+ "query": {
+ "term": {
+ "user": "kimchy"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+emit snippet
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+handle snippet
+test snippet
+
+ - do:
+ bulk:
+ index: twitter
+ type: tweet
+ refresh: true
+ body: |
+ {"index":{"_id": "0"}}
+ {"user": "kimchy", "message": "trying out Elasticsearch", "date": "2009-11-15T14:12:12", "likes": 0}
+ {"index":{"_id": "1"}}
+ {"user": "test", "message": "some message with the number 1", "date": "2009-11-15T14:12:12", "likes": 1}
+ {"index":{"_id": "2"}}
+ {"user": "test", "message": "some message with the number 2", "date": "2009-11-15T14:12:12", "likes": 2}
+ {"index":{"_id": "3"}}
+ {"user": "test", "message": "some message with the number 3", "date": "2009-11-15T14:12:12", "likes": 3}
+ {"index":{"_id": "4"}}
+ {"user": "test", "message": "some message with the number 4", "date": "2009-11-15T14:12:12", "likes": 4}
+emit snippet
+query part: routing=1
+handle snippet
+test snippet
+
+ - do:
+ bulk:
+ index: twitter
+ type: tweet
+ refresh: true
+ body: |
+ {"index":{"_id": "0"}}
+ {"user": "kimchy", "message": "trying out Elasticsearch", "date": "2009-11-15T14:12:12", "likes": 0}
+ {"index":{"_id": "1"}}
+ {"user": "test", "message": "some message with the number 1", "date": "2009-11-15T14:12:12", "likes": 1}
+ {"index":{"_id": "2"}}
+ {"user": "test", "message": "some message with the number 2", "date": "2009-11-15T14:12:12", "likes": 2}
+ {"index":{"_id": "3"}}
+ {"user": "test", "message": "some message with the number 3", "date": "2009-11-15T14:12:12", "likes": 3}
+ {"index":{"_id": "4"}}
+ {"user": "test", "message": "some message with the number 4", "date": "2009-11-15T14:12:12", "likes": 4}
+emit snippet
+query part: scroll_size=100
+handle snippet
+test snippet
+
+ - do:
+ bulk:
+ index: twitter
+ type: tweet
+ refresh: true
+ body: |
+ {"index":{"_id": "0"}}
+ {"user": "kimchy", "message": "trying out Elasticsearch", "date": "2009-11-15T14:12:12", "likes": 0}
+ {"index":{"_id": "1"}}
+ {"user": "test", "message": "some message with the number 1", "date": "2009-11-15T14:12:12", "likes": 1}
+ {"index":{"_id": "2"}}
+ {"user": "test", "message": "some message with the number 2", "date": "2009-11-15T14:12:12", "likes": 2}
+ {"index":{"_id": "3"}}
+ {"user": "test", "message": "some message with the number 3", "date": "2009-11-15T14:12:12", "likes": 3}
+ {"index":{"_id": "4"}}
+ {"user": "test", "message": "some message with the number 4", "date": "2009-11-15T14:12:12", "likes": 4}
+emit snippet
+body part:
+{
+ "description" : "sets foo",
+ "processors" : [ {
+ "set" : {
+ "field": "foo",
+ "value": "bar"
+ }
+ } ]
+}
+emit snippet
+query part: pipeline=set-foo
+handle snippet
+handle snippet
+test snippet
+emit snippet
+query part: detailed=true&action=*byquery
+handle snippet
+handle snippet
+test snippet
+emit snippet
+handle snippet
+test snippet
+emit snippet
+query part: requests_per_second=unlimited
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "test": {
+ "dynamic": false,
+ "properties": {
+ "text": {"type": "text"}
+ }
+ }
+ }
+}
+emit snippet
+query part: refresh
+body part:
+{
+ "text": "words words",
+ "flag": "bar"
+}
+emit snippet
+query part: refresh
+body part:
+{
+ "text": "words words",
+ "flag": "foo"
+}
+emit snippet
+body part:
+{
+ "properties": {
+ "text": {"type": "text"},
+ "flag": {"type": "text", "analyzer": "keyword"}
+ }
+}
+handle snippet
+test snippet
+emit snippet
+query part: filter_path=hits.total
+body part:
+{
+ "query": {
+ "match": {
+ "flag": "foo"
+ }
+ }
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+query part: refresh&conflicts=proceed
+emit snippet
+query part: filter_path=hits.total
+body part:
+{
+ "query": {
+ "match": {
+ "flag": "foo"
+ }
+ }
+}
+handle snippet
+handle snippet
+test snippet
+
+ - do:
+ bulk:
+ index: twitter
+ type: tweet
+ refresh: true
+ body: |
+ {"index":{"_id": "0"}}
+ {"user": "kimchy", "message": "trying out Elasticsearch", "date": "2009-11-15T14:12:12", "likes": 0}
+ {"index":{"_id": "1"}}
+ {"user": "test", "message": "some message with the number 1", "date": "2009-11-15T14:12:12", "likes": 1}
+ {"index":{"_id": "2"}}
+ {"user": "test", "message": "some message with the number 2", "date": "2009-11-15T14:12:12", "likes": 2}
+ {"index":{"_id": "3"}}
+ {"user": "test", "message": "some message with the number 3", "date": "2009-11-15T14:12:12", "likes": 3}
+ {"index":{"_id": "4"}}
+ {"user": "test", "message": "some message with the number 4", "date": "2009-11-15T14:12:12", "likes": 4}
+ {"index":{"_id": "5"}}
+ {"user": "test", "message": "some message with the number 5", "date": "2009-11-15T14:12:12", "likes": 5}
+ {"index":{"_id": "6"}}
+ {"user": "test", "message": "some message with the number 6", "date": "2009-11-15T14:12:12", "likes": 6}
+ {"index":{"_id": "7"}}
+ {"user": "test", "message": "some message with the number 7", "date": "2009-11-15T14:12:12", "likes": 7}
+ {"index":{"_id": "8"}}
+ {"user": "test", "message": "some message with the number 8", "date": "2009-11-15T14:12:12", "likes": 8}
+ {"index":{"_id": "9"}}
+ {"user": "test", "message": "some message with the number 9", "date": "2009-11-15T14:12:12", "likes": 9}
+ {"index":{"_id": "10"}}
+ {"user": "test", "message": "some message with the number 10", "date": "2009-11-15T14:12:12", "likes": 10}
+ {"index":{"_id": "11"}}
+ {"user": "test", "message": "some message with the number 11", "date": "2009-11-15T14:12:12", "likes": 11}
+ {"index":{"_id": "12"}}
+ {"user": "test", "message": "some message with the number 12", "date": "2009-11-15T14:12:12", "likes": 12}
+ {"index":{"_id": "13"}}
+ {"user": "test", "message": "some message with the number 13", "date": "2009-11-15T14:12:12", "likes": 13}
+ {"index":{"_id": "14"}}
+ {"user": "test", "message": "some message with the number 14", "date": "2009-11-15T14:12:12", "likes": 14}
+ {"index":{"_id": "15"}}
+ {"user": "test", "message": "some message with the number 15", "date": "2009-11-15T14:12:12", "likes": 15}
+ {"index":{"_id": "16"}}
+ {"user": "test", "message": "some message with the number 16", "date": "2009-11-15T14:12:12", "likes": 16}
+ {"index":{"_id": "17"}}
+ {"user": "test", "message": "some message with the number 17", "date": "2009-11-15T14:12:12", "likes": 17}
+ {"index":{"_id": "18"}}
+ {"user": "test", "message": "some message with the number 18", "date": "2009-11-15T14:12:12", "likes": 18}
+ {"index":{"_id": "19"}}
+ {"user": "test", "message": "some message with the number 19", "date": "2009-11-15T14:12:12", "likes": 19}
+ {"index":{"_id": "20"}}
+ {"user": "test", "message": "some message with the number 20", "date": "2009-11-15T14:12:12", "likes": 20}
+ {"index":{"_id": "21"}}
+ {"user": "test", "message": "some message with the number 21", "date": "2009-11-15T14:12:12", "likes": 21}
+ {"index":{"_id": "22"}}
+ {"user": "test", "message": "some message with the number 22", "date": "2009-11-15T14:12:12", "likes": 22}
+ {"index":{"_id": "23"}}
+ {"user": "test", "message": "some message with the number 23", "date": "2009-11-15T14:12:12", "likes": 23}
+ {"index":{"_id": "24"}}
+ {"user": "test", "message": "some message with the number 24", "date": "2009-11-15T14:12:12", "likes": 24}
+ {"index":{"_id": "25"}}
+ {"user": "test", "message": "some message with the number 25", "date": "2009-11-15T14:12:12", "likes": 25}
+ {"index":{"_id": "26"}}
+ {"user": "test", "message": "some message with the number 26", "date": "2009-11-15T14:12:12", "likes": 26}
+ {"index":{"_id": "27"}}
+ {"user": "test", "message": "some message with the number 27", "date": "2009-11-15T14:12:12", "likes": 27}
+ {"index":{"_id": "28"}}
+ {"user": "test", "message": "some message with the number 28", "date": "2009-11-15T14:12:12", "likes": 28}
+ {"index":{"_id": "29"}}
+ {"user": "test", "message": "some message with the number 29", "date": "2009-11-15T14:12:12", "likes": 29}
+ {"index":{"_id": "30"}}
+ {"user": "test", "message": "some message with the number 30", "date": "2009-11-15T14:12:12", "likes": 30}
+ {"index":{"_id": "31"}}
+ {"user": "test", "message": "some message with the number 31", "date": "2009-11-15T14:12:12", "likes": 31}
+ {"index":{"_id": "32"}}
+ {"user": "test", "message": "some message with the number 32", "date": "2009-11-15T14:12:12", "likes": 32}
+ {"index":{"_id": "33"}}
+ {"user": "test", "message": "some message with the number 33", "date": "2009-11-15T14:12:12", "likes": 33}
+ {"index":{"_id": "34"}}
+ {"user": "test", "message": "some message with the number 34", "date": "2009-11-15T14:12:12", "likes": 34}
+ {"index":{"_id": "35"}}
+ {"user": "test", "message": "some message with the number 35", "date": "2009-11-15T14:12:12", "likes": 35}
+ {"index":{"_id": "36"}}
+ {"user": "test", "message": "some message with the number 36", "date": "2009-11-15T14:12:12", "likes": 36}
+ {"index":{"_id": "37"}}
+ {"user": "test", "message": "some message with the number 37", "date": "2009-11-15T14:12:12", "likes": 37}
+ {"index":{"_id": "38"}}
+ {"user": "test", "message": "some message with the number 38", "date": "2009-11-15T14:12:12", "likes": 38}
+ {"index":{"_id": "39"}}
+ {"user": "test", "message": "some message with the number 39", "date": "2009-11-15T14:12:12", "likes": 39}
+ {"index":{"_id": "40"}}
+ {"user": "test", "message": "some message with the number 40", "date": "2009-11-15T14:12:12", "likes": 40}
+ {"index":{"_id": "41"}}
+ {"user": "test", "message": "some message with the number 41", "date": "2009-11-15T14:12:12", "likes": 41}
+ {"index":{"_id": "42"}}
+ {"user": "test", "message": "some message with the number 42", "date": "2009-11-15T14:12:12", "likes": 42}
+ {"index":{"_id": "43"}}
+ {"user": "test", "message": "some message with the number 43", "date": "2009-11-15T14:12:12", "likes": 43}
+ {"index":{"_id": "44"}}
+ {"user": "test", "message": "some message with the number 44", "date": "2009-11-15T14:12:12", "likes": 44}
+ {"index":{"_id": "45"}}
+ {"user": "test", "message": "some message with the number 45", "date": "2009-11-15T14:12:12", "likes": 45}
+ {"index":{"_id": "46"}}
+ {"user": "test", "message": "some message with the number 46", "date": "2009-11-15T14:12:12", "likes": 46}
+ {"index":{"_id": "47"}}
+ {"user": "test", "message": "some message with the number 47", "date": "2009-11-15T14:12:12", "likes": 47}
+ {"index":{"_id": "48"}}
+ {"user": "test", "message": "some message with the number 48", "date": "2009-11-15T14:12:12", "likes": 48}
+ {"index":{"_id": "49"}}
+ {"user": "test", "message": "some message with the number 49", "date": "2009-11-15T14:12:12", "likes": 49}
+ {"index":{"_id": "50"}}
+ {"user": "test", "message": "some message with the number 50", "date": "2009-11-15T14:12:12", "likes": 50}
+ {"index":{"_id": "51"}}
+ {"user": "test", "message": "some message with the number 51", "date": "2009-11-15T14:12:12", "likes": 51}
+ {"index":{"_id": "52"}}
+ {"user": "test", "message": "some message with the number 52", "date": "2009-11-15T14:12:12", "likes": 52}
+ {"index":{"_id": "53"}}
+ {"user": "test", "message": "some message with the number 53", "date": "2009-11-15T14:12:12", "likes": 53}
+ {"index":{"_id": "54"}}
+ {"user": "test", "message": "some message with the number 54", "date": "2009-11-15T14:12:12", "likes": 54}
+ {"index":{"_id": "55"}}
+ {"user": "test", "message": "some message with the number 55", "date": "2009-11-15T14:12:12", "likes": 55}
+ {"index":{"_id": "56"}}
+ {"user": "test", "message": "some message with the number 56", "date": "2009-11-15T14:12:12", "likes": 56}
+ {"index":{"_id": "57"}}
+ {"user": "test", "message": "some message with the number 57", "date": "2009-11-15T14:12:12", "likes": 57}
+ {"index":{"_id": "58"}}
+ {"user": "test", "message": "some message with the number 58", "date": "2009-11-15T14:12:12", "likes": 58}
+ {"index":{"_id": "59"}}
+ {"user": "test", "message": "some message with the number 59", "date": "2009-11-15T14:12:12", "likes": 59}
+ {"index":{"_id": "60"}}
+ {"user": "test", "message": "some message with the number 60", "date": "2009-11-15T14:12:12", "likes": 60}
+ {"index":{"_id": "61"}}
+ {"user": "test", "message": "some message with the number 61", "date": "2009-11-15T14:12:12", "likes": 61}
+ {"index":{"_id": "62"}}
+ {"user": "test", "message": "some message with the number 62", "date": "2009-11-15T14:12:12", "likes": 62}
+ {"index":{"_id": "63"}}
+ {"user": "test", "message": "some message with the number 63", "date": "2009-11-15T14:12:12", "likes": 63}
+ {"index":{"_id": "64"}}
+ {"user": "test", "message": "some message with the number 64", "date": "2009-11-15T14:12:12", "likes": 64}
+ {"index":{"_id": "65"}}
+ {"user": "test", "message": "some message with the number 65", "date": "2009-11-15T14:12:12", "likes": 65}
+ {"index":{"_id": "66"}}
+ {"user": "test", "message": "some message with the number 66", "date": "2009-11-15T14:12:12", "likes": 66}
+ {"index":{"_id": "67"}}
+ {"user": "test", "message": "some message with the number 67", "date": "2009-11-15T14:12:12", "likes": 67}
+ {"index":{"_id": "68"}}
+ {"user": "test", "message": "some message with the number 68", "date": "2009-11-15T14:12:12", "likes": 68}
+ {"index":{"_id": "69"}}
+ {"user": "test", "message": "some message with the number 69", "date": "2009-11-15T14:12:12", "likes": 69}
+ {"index":{"_id": "70"}}
+ {"user": "test", "message": "some message with the number 70", "date": "2009-11-15T14:12:12", "likes": 70}
+ {"index":{"_id": "71"}}
+ {"user": "test", "message": "some message with the number 71", "date": "2009-11-15T14:12:12", "likes": 71}
+ {"index":{"_id": "72"}}
+ {"user": "test", "message": "some message with the number 72", "date": "2009-11-15T14:12:12", "likes": 72}
+ {"index":{"_id": "73"}}
+ {"user": "test", "message": "some message with the number 73", "date": "2009-11-15T14:12:12", "likes": 73}
+ {"index":{"_id": "74"}}
+ {"user": "test", "message": "some message with the number 74", "date": "2009-11-15T14:12:12", "likes": 74}
+ {"index":{"_id": "75"}}
+ {"user": "test", "message": "some message with the number 75", "date": "2009-11-15T14:12:12", "likes": 75}
+ {"index":{"_id": "76"}}
+ {"user": "test", "message": "some message with the number 76", "date": "2009-11-15T14:12:12", "likes": 76}
+ {"index":{"_id": "77"}}
+ {"user": "test", "message": "some message with the number 77", "date": "2009-11-15T14:12:12", "likes": 77}
+ {"index":{"_id": "78"}}
+ {"user": "test", "message": "some message with the number 78", "date": "2009-11-15T14:12:12", "likes": 78}
+ {"index":{"_id": "79"}}
+ {"user": "test", "message": "some message with the number 79", "date": "2009-11-15T14:12:12", "likes": 79}
+ {"index":{"_id": "80"}}
+ {"user": "test", "message": "some message with the number 80", "date": "2009-11-15T14:12:12", "likes": 80}
+ {"index":{"_id": "81"}}
+ {"user": "test", "message": "some message with the number 81", "date": "2009-11-15T14:12:12", "likes": 81}
+ {"index":{"_id": "82"}}
+ {"user": "test", "message": "some message with the number 82", "date": "2009-11-15T14:12:12", "likes": 82}
+ {"index":{"_id": "83"}}
+ {"user": "test", "message": "some message with the number 83", "date": "2009-11-15T14:12:12", "likes": 83}
+ {"index":{"_id": "84"}}
+ {"user": "test", "message": "some message with the number 84", "date": "2009-11-15T14:12:12", "likes": 84}
+ {"index":{"_id": "85"}}
+ {"user": "test", "message": "some message with the number 85", "date": "2009-11-15T14:12:12", "likes": 85}
+ {"index":{"_id": "86"}}
+ {"user": "test", "message": "some message with the number 86", "date": "2009-11-15T14:12:12", "likes": 86}
+ {"index":{"_id": "87"}}
+ {"user": "test", "message": "some message with the number 87", "date": "2009-11-15T14:12:12", "likes": 87}
+ {"index":{"_id": "88"}}
+ {"user": "test", "message": "some message with the number 88", "date": "2009-11-15T14:12:12", "likes": 88}
+ {"index":{"_id": "89"}}
+ {"user": "test", "message": "some message with the number 89", "date": "2009-11-15T14:12:12", "likes": 89}
+ {"index":{"_id": "90"}}
+ {"user": "test", "message": "some message with the number 90", "date": "2009-11-15T14:12:12", "likes": 90}
+ {"index":{"_id": "91"}}
+ {"user": "test", "message": "some message with the number 91", "date": "2009-11-15T14:12:12", "likes": 91}
+ {"index":{"_id": "92"}}
+ {"user": "test", "message": "some message with the number 92", "date": "2009-11-15T14:12:12", "likes": 92}
+ {"index":{"_id": "93"}}
+ {"user": "test", "message": "some message with the number 93", "date": "2009-11-15T14:12:12", "likes": 93}
+ {"index":{"_id": "94"}}
+ {"user": "test", "message": "some message with the number 94", "date": "2009-11-15T14:12:12", "likes": 94}
+ {"index":{"_id": "95"}}
+ {"user": "test", "message": "some message with the number 95", "date": "2009-11-15T14:12:12", "likes": 95}
+ {"index":{"_id": "96"}}
+ {"user": "test", "message": "some message with the number 96", "date": "2009-11-15T14:12:12", "likes": 96}
+ {"index":{"_id": "97"}}
+ {"user": "test", "message": "some message with the number 97", "date": "2009-11-15T14:12:12", "likes": 97}
+ {"index":{"_id": "98"}}
+ {"user": "test", "message": "some message with the number 98", "date": "2009-11-15T14:12:12", "likes": 98}
+ {"index":{"_id": "99"}}
+ {"user": "test", "message": "some message with the number 99", "date": "2009-11-15T14:12:12", "likes": 99}
+ {"index":{"_id": "100"}}
+ {"user": "test", "message": "some message with the number 100", "date": "2009-11-15T14:12:12", "likes": 100}
+ {"index":{"_id": "101"}}
+ {"user": "test", "message": "some message with the number 101", "date": "2009-11-15T14:12:12", "likes": 101}
+ {"index":{"_id": "102"}}
+ {"user": "test", "message": "some message with the number 102", "date": "2009-11-15T14:12:12", "likes": 102}
+ {"index":{"_id": "103"}}
+ {"user": "test", "message": "some message with the number 103", "date": "2009-11-15T14:12:12", "likes": 103}
+ {"index":{"_id": "104"}}
+ {"user": "test", "message": "some message with the number 104", "date": "2009-11-15T14:12:12", "likes": 104}
+ {"index":{"_id": "105"}}
+ {"user": "test", "message": "some message with the number 105", "date": "2009-11-15T14:12:12", "likes": 105}
+ {"index":{"_id": "106"}}
+ {"user": "test", "message": "some message with the number 106", "date": "2009-11-15T14:12:12", "likes": 106}
+ {"index":{"_id": "107"}}
+ {"user": "test", "message": "some message with the number 107", "date": "2009-11-15T14:12:12", "likes": 107}
+ {"index":{"_id": "108"}}
+ {"user": "test", "message": "some message with the number 108", "date": "2009-11-15T14:12:12", "likes": 108}
+ {"index":{"_id": "109"}}
+ {"user": "test", "message": "some message with the number 109", "date": "2009-11-15T14:12:12", "likes": 109}
+ {"index":{"_id": "110"}}
+ {"user": "test", "message": "some message with the number 110", "date": "2009-11-15T14:12:12", "likes": 110}
+ {"index":{"_id": "111"}}
+ {"user": "test", "message": "some message with the number 111", "date": "2009-11-15T14:12:12", "likes": 111}
+ {"index":{"_id": "112"}}
+ {"user": "test", "message": "some message with the number 112", "date": "2009-11-15T14:12:12", "likes": 112}
+ {"index":{"_id": "113"}}
+ {"user": "test", "message": "some message with the number 113", "date": "2009-11-15T14:12:12", "likes": 113}
+ {"index":{"_id": "114"}}
+ {"user": "test", "message": "some message with the number 114", "date": "2009-11-15T14:12:12", "likes": 114}
+ {"index":{"_id": "115"}}
+ {"user": "test", "message": "some message with the number 115", "date": "2009-11-15T14:12:12", "likes": 115}
+ {"index":{"_id": "116"}}
+ {"user": "test", "message": "some message with the number 116", "date": "2009-11-15T14:12:12", "likes": 116}
+ {"index":{"_id": "117"}}
+ {"user": "test", "message": "some message with the number 117", "date": "2009-11-15T14:12:12", "likes": 117}
+ {"index":{"_id": "118"}}
+ {"user": "test", "message": "some message with the number 118", "date": "2009-11-15T14:12:12", "likes": 118}
+ {"index":{"_id": "119"}}
+ {"user": "test", "message": "some message with the number 119", "date": "2009-11-15T14:12:12", "likes": 119}
+emit snippet
+body part:
+{
+ "source": {
+ "index": "twitter"
+ },
+ "dest": {
+ "index": "new_twitter"
+ }
+}
+handle snippet
+handle snippet
+test snippet
+
+ - do:
+ bulk:
+ index: twitter
+ type: tweet
+ refresh: true
+ body: |
+ {"index":{"_id": "0"}}
+ {"user": "kimchy", "message": "trying out Elasticsearch", "date": "2009-11-15T14:12:12", "likes": 0}
+ {"index":{"_id": "1"}}
+ {"user": "test", "message": "some message with the number 1", "date": "2009-11-15T14:12:12", "likes": 1}
+ {"index":{"_id": "2"}}
+ {"user": "test", "message": "some message with the number 2", "date": "2009-11-15T14:12:12", "likes": 2}
+ {"index":{"_id": "3"}}
+ {"user": "test", "message": "some message with the number 3", "date": "2009-11-15T14:12:12", "likes": 3}
+ {"index":{"_id": "4"}}
+ {"user": "test", "message": "some message with the number 4", "date": "2009-11-15T14:12:12", "likes": 4}
+emit snippet
+body part:
+{
+ "source": {
+ "index": "twitter"
+ },
+ "dest": {
+ "index": "new_twitter",
+ "version_type": "internal"
+ }
+}
+handle snippet
+test snippet
+
+ - do:
+ bulk:
+ index: twitter
+ type: tweet
+ refresh: true
+ body: |
+ {"index":{"_id": "0"}}
+ {"user": "kimchy", "message": "trying out Elasticsearch", "date": "2009-11-15T14:12:12", "likes": 0}
+ {"index":{"_id": "1"}}
+ {"user": "test", "message": "some message with the number 1", "date": "2009-11-15T14:12:12", "likes": 1}
+ {"index":{"_id": "2"}}
+ {"user": "test", "message": "some message with the number 2", "date": "2009-11-15T14:12:12", "likes": 2}
+ {"index":{"_id": "3"}}
+ {"user": "test", "message": "some message with the number 3", "date": "2009-11-15T14:12:12", "likes": 3}
+ {"index":{"_id": "4"}}
+ {"user": "test", "message": "some message with the number 4", "date": "2009-11-15T14:12:12", "likes": 4}
+emit snippet
+body part:
+{
+ "source": {
+ "index": "twitter"
+ },
+ "dest": {
+ "index": "new_twitter",
+ "version_type": "external"
+ }
+}
+handle snippet
+test snippet
+
+ - do:
+ bulk:
+ index: twitter
+ type: tweet
+ refresh: true
+ body: |
+ {"index":{"_id": "0"}}
+ {"user": "kimchy", "message": "trying out Elasticsearch", "date": "2009-11-15T14:12:12", "likes": 0}
+ {"index":{"_id": "1"}}
+ {"user": "test", "message": "some message with the number 1", "date": "2009-11-15T14:12:12", "likes": 1}
+ {"index":{"_id": "2"}}
+ {"user": "test", "message": "some message with the number 2", "date": "2009-11-15T14:12:12", "likes": 2}
+ {"index":{"_id": "3"}}
+ {"user": "test", "message": "some message with the number 3", "date": "2009-11-15T14:12:12", "likes": 3}
+ {"index":{"_id": "4"}}
+ {"user": "test", "message": "some message with the number 4", "date": "2009-11-15T14:12:12", "likes": 4}
+emit snippet
+body part:
+{
+ "source": {
+ "index": "twitter"
+ },
+ "dest": {
+ "index": "new_twitter",
+ "op_type": "create"
+ }
+}
+handle snippet
+test snippet
+
+ - do:
+ bulk:
+ index: twitter
+ type: tweet
+ refresh: true
+ body: |
+ {"index":{"_id": "0"}}
+ {"user": "kimchy", "message": "trying out Elasticsearch", "date": "2009-11-15T14:12:12", "likes": 0}
+ {"index":{"_id": "1"}}
+ {"user": "test", "message": "some message with the number 1", "date": "2009-11-15T14:12:12", "likes": 1}
+ {"index":{"_id": "2"}}
+ {"user": "test", "message": "some message with the number 2", "date": "2009-11-15T14:12:12", "likes": 2}
+ {"index":{"_id": "3"}}
+ {"user": "test", "message": "some message with the number 3", "date": "2009-11-15T14:12:12", "likes": 3}
+ {"index":{"_id": "4"}}
+ {"user": "test", "message": "some message with the number 4", "date": "2009-11-15T14:12:12", "likes": 4}
+emit snippet
+body part:
+{
+ "conflicts": "proceed",
+ "source": {
+ "index": "twitter"
+ },
+ "dest": {
+ "index": "new_twitter",
+ "op_type": "create"
+ }
+}
+handle snippet
+test snippet
+
+ - do:
+ bulk:
+ index: twitter
+ type: tweet
+ refresh: true
+ body: |
+ {"index":{"_id": "0"}}
+ {"user": "kimchy", "message": "trying out Elasticsearch", "date": "2009-11-15T14:12:12", "likes": 0}
+ {"index":{"_id": "1"}}
+ {"user": "test", "message": "some message with the number 1", "date": "2009-11-15T14:12:12", "likes": 1}
+ {"index":{"_id": "2"}}
+ {"user": "test", "message": "some message with the number 2", "date": "2009-11-15T14:12:12", "likes": 2}
+ {"index":{"_id": "3"}}
+ {"user": "test", "message": "some message with the number 3", "date": "2009-11-15T14:12:12", "likes": 3}
+ {"index":{"_id": "4"}}
+ {"user": "test", "message": "some message with the number 4", "date": "2009-11-15T14:12:12", "likes": 4}
+emit snippet
+body part:
+{
+ "source": {
+ "index": "twitter",
+ "type": "tweet",
+ "query": {
+ "term": {
+ "user": "kimchy"
+ }
+ }
+ },
+ "dest": {
+ "index": "new_twitter"
+ }
+}
+handle snippet
+test snippet
+emit snippet
+emit snippet
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+body part:
+{
+ "source": {
+ "index": ["twitter", "blog"],
+ "type": ["tweet", "post"]
+ },
+ "dest": {
+ "index": "all_together"
+ }
+}
+handle snippet
+test snippet
+
+ - do:
+ bulk:
+ index: twitter
+ type: tweet
+ refresh: true
+ body: |
+ {"index":{"_id": "0"}}
+ {"user": "kimchy", "message": "trying out Elasticsearch", "date": "2009-11-15T14:12:12", "likes": 0}
+ {"index":{"_id": "1"}}
+ {"user": "test", "message": "some message with the number 1", "date": "2009-11-15T14:12:12", "likes": 1}
+ {"index":{"_id": "2"}}
+ {"user": "test", "message": "some message with the number 2", "date": "2009-11-15T14:12:12", "likes": 2}
+ {"index":{"_id": "3"}}
+ {"user": "test", "message": "some message with the number 3", "date": "2009-11-15T14:12:12", "likes": 3}
+ {"index":{"_id": "4"}}
+ {"user": "test", "message": "some message with the number 4", "date": "2009-11-15T14:12:12", "likes": 4}
+emit snippet
+body part:
+{
+ "size": 1,
+ "source": {
+ "index": "twitter"
+ },
+ "dest": {
+ "index": "new_twitter"
+ }
+}
+handle snippet
+test snippet
+
+ - do:
+ bulk:
+ index: twitter
+ type: tweet
+ refresh: true
+ body: |
+ {"index":{"_id": "0"}}
+ {"user": "kimchy", "message": "trying out Elasticsearch", "date": "2009-11-15T14:12:12", "likes": 0}
+ {"index":{"_id": "1"}}
+ {"user": "test", "message": "some message with the number 1", "date": "2009-11-15T14:12:12", "likes": 1}
+ {"index":{"_id": "2"}}
+ {"user": "test", "message": "some message with the number 2", "date": "2009-11-15T14:12:12", "likes": 2}
+ {"index":{"_id": "3"}}
+ {"user": "test", "message": "some message with the number 3", "date": "2009-11-15T14:12:12", "likes": 3}
+ {"index":{"_id": "4"}}
+ {"user": "test", "message": "some message with the number 4", "date": "2009-11-15T14:12:12", "likes": 4}
+emit snippet
+body part:
+{
+ "size": 10000,
+ "source": {
+ "index": "twitter",
+ "sort": { "date": "desc" }
+ },
+ "dest": {
+ "index": "new_twitter"
+ }
+}
+handle snippet
+test snippet
+
+ - do:
+ bulk:
+ index: twitter
+ type: tweet
+ refresh: true
+ body: |
+ {"index":{"_id": "0"}}
+ {"user": "kimchy", "message": "trying out Elasticsearch", "date": "2009-11-15T14:12:12", "likes": 0}
+ {"index":{"_id": "1"}}
+ {"user": "test", "message": "some message with the number 1", "date": "2009-11-15T14:12:12", "likes": 1}
+ {"index":{"_id": "2"}}
+ {"user": "test", "message": "some message with the number 2", "date": "2009-11-15T14:12:12", "likes": 2}
+ {"index":{"_id": "3"}}
+ {"user": "test", "message": "some message with the number 3", "date": "2009-11-15T14:12:12", "likes": 3}
+ {"index":{"_id": "4"}}
+ {"user": "test", "message": "some message with the number 4", "date": "2009-11-15T14:12:12", "likes": 4}
+emit snippet
+body part:
+{
+ "source": {
+ "index": "twitter"
+ },
+ "dest": {
+ "index": "new_twitter",
+ "version_type": "external"
+ },
+ "script": {
+ "inline": "if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}"
+ }
+}
+handle snippet
+test snippet
+emit snippet
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+body part:
+{
+ "source": {
+ "index": "source",
+ "query": {
+ "match": {
+ "company": "cat"
+ }
+ }
+ },
+ "dest": {
+ "index": "dest",
+ "routing": "=cat"
+ }
+}
+handle snippet
+test snippet
+emit snippet
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+body part:
+{
+ "source": {
+ "index": "source",
+ "size": 100
+ },
+ "dest": {
+ "index": "dest",
+ "routing": "=cat"
+ }
+}
+handle snippet
+test snippet
+emit snippet
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+body part:
+{
+ "source": {
+ "index": "source"
+ },
+ "dest": {
+ "index": "dest",
+ "pipeline": "some_ingest_pipeline"
+ }
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+query part: detailed=true&actions=*reindex
+handle snippet
+handle snippet
+test snippet
+emit snippet
+handle snippet
+test snippet
+emit snippet
+query part: requests_per_second=unlimited
+handle snippet
+test snippet
+emit snippet
+query part: refresh
+body part:
+{
+ "text": "words words",
+ "flag": "foo"
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "source": {
+ "index": "test"
+ },
+ "dest": {
+ "index": "test2"
+ },
+ "script": {
+ "inline": "ctx._source.tag = ctx._source.remove(\"flag\")"
+ }
+}
+handle snippet
+test snippet
+emit snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+catch part: request
+query part: pipeline=my_pipeline_id
+body part:
+{
+ "foo": "bar"
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "transient": {
+ "cluster.routing.allocation.enable": "none"
+ }
+}
+handle snippet
+test snippet
+emit snippet
+handle snippet
+test snippet
+emit snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "transient": {
+ "cluster.routing.allocation.enable": "all"
+ }
+}
+handle snippet
+test snippet
+emit snippet
+handle snippet
+test snippet
+emit snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "persistent": {
+ "cluster.routing.allocation.enable": "none"
+ }
+}
+handle snippet
+test snippet
+emit snippet
+handle snippet
+test snippet
+emit snippet
+emit snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "persistent": {
+ "cluster.routing.allocation.enable": "all"
+ }
+}
+handle snippet
+test snippet
+emit snippet
+emit snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "user": {
+ "_all": { "enabled": false },
+ "properties": {
+ "title": { "type": "text" },
+ "name": { "type": "text" },
+ "age": { "type": "integer" }
+ }
+ },
+ "blogpost": {
+ "_all": { "enabled": false },
+ "properties": {
+ "title": { "type": "text" },
+ "body": { "type": "text" },
+ "user_id": {
+ "type": "keyword"
+ },
+ "created": {
+ "type": "date",
+ "format": "strict_date_optional_time||epoch_millis"
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{ "count": 5 }
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "index.mapper.dynamic":false
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "session": {
+ "properties": {
+ "user_id": {
+ "type": "keyword"
+ },
+ "last_updated": {
+ "type": "date"
+ },
+ "session_data": {
+ "enabled": false
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "user_id": "kimchy",
+ "session_data": {
+ "arbitrary_object": {
+ "some_array": [ "foo", "bar", { "baz": 2 } ]
+ }
+ },
+ "last_updated": "2015-12-06T18:20:22"
+}
+emit snippet
+body part:
+{
+ "user_id": "jpountz",
+ "session_data": "none",
+ "last_updated": "2015-12-06T18:22:13"
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "session": {
+ "enabled": false
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "user_id": "kimchy",
+ "session_data": {
+ "arbitrary_object": {
+ "some_array": [ "foo", "bar", { "baz": 2 } ]
+ }
+ },
+ "last_updated": "2015-12-06T18:20:22"
+}
+emit snippet
+emit snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "location": {
+ "type": "geo_point",
+ "geohash_prefix": true,
+ "geohash_precision": 6
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "location": {
+ "lat": 41.12,
+ "lon": -71.34
+ }
+}
+emit snippet
+query part: fielddata_fields=location.geohash
+body part:
+{
+ "query": {
+ "term": {
+ "location.geohash": "drm3bt"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "date": {
+ "type": "date",
+ "format": "yyyy-MM-dd"
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "first_name": {
+ "type": "text",
+ "copy_to": "full_name"
+ },
+ "last_name": {
+ "type": "text",
+ "copy_to": "full_name"
+ },
+ "full_name": {
+ "type": "text"
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "first_name": "John",
+ "last_name": "Smith"
+}
+emit snippet
+body part:
+{
+ "query": {
+ "match": {
+ "full_name": {
+ "query": "John Smith",
+ "operator": "and"
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "title": {
+ "type": "text",
+ "store": true
+ },
+ "date": {
+ "type": "date",
+ "store": true
+ },
+ "content": {
+ "type": "text"
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "title": "Some short title",
+ "date": "2015-01-01",
+ "content": "A very long content field..."
+}
+emit snippet
+body part:
+{
+ "fields": [ "title", "date" ]
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "status_code": {
+ "type": "keyword",
+ "null_value": "NULL"
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "status_code": null
+}
+emit snippet
+body part:
+{
+ "status_code": []
+}
+emit snippet
+body part:
+{
+ "query": {
+ "term": {
+ "status_code": "NULL"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "number_one": {
+ "type": "integer"
+ },
+ "number_two": {
+ "type": "integer",
+ "coerce": false
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "number_one": "10"
+}
+emit snippet
+catch part: request
+body part:
+{
+ "number_two": "10"
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "index.mapping.coerce": false
+ },
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "number_one": {
+ "type": "integer",
+ "coerce": true
+ },
+ "number_two": {
+ "type": "integer"
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{ "number_one": "10" }
+emit snippet
+catch part: request
+body part:
+{ "number_two": "10" }
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "analysis": {
+ "filter": {
+ "autocomplete_filter": {
+ "type": "edge_ngram",
+ "min_gram": 1,
+ "max_gram": 20
+ }
+ },
+ "analyzer": {
+ "autocomplete": {
+ "type": "custom",
+ "tokenizer": "standard",
+ "filter": [
+ "lowercase",
+ "autocomplete_filter"
+ ]
+ }
+ }
+ }
+ },
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "text": {
+ "type": "text",
+ "analyzer": "autocomplete",
+ "search_analyzer": "standard"
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "text": "Quick Brown Fox"
+}
+emit snippet
+body part:
+{
+ "query": {
+ "match": {
+ "text": {
+ "query": "Quick Br",
+ "operator": "and"
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "text": {
+ "type": "text",
+ "term_vector": "with_positions_offsets"
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "text": "Quick brown fox"
+}
+emit snippet
+body part:
+{
+ "query": {
+ "match": {
+ "text": "brown fox"
+ }
+ },
+ "highlight": {
+ "fields": {
+ "text": {}
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "city": {
+ "type": "text",
+ "fields": {
+ "raw": {
+ "type": "keyword"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "city": "New York"
+}
+emit snippet
+body part:
+{
+ "city": "York"
+}
+emit snippet
+body part:
+{
+ "query": {
+ "match": {
+ "city": "york"
+ }
+ },
+ "sort": {
+ "city.raw": "asc"
+ },
+ "aggs": {
+ "Cities": {
+ "terms": {
+ "field": "city.raw"
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "text": {
+ "type": "text",
+ "fields": {
+ "english": {
+ "type": "text",
+ "analyzer": "english"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{ "text": "quick brown fox" }
+emit snippet
+body part:
+{ "text": "quick brown foxes" }
+emit snippet
+body part:
+{
+ "query": {
+ "multi_match": {
+ "query": "quick brown foxes",
+ "fields": [
+ "text",
+ "text.english"
+ ],
+ "type": "most_fields"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "tag": {
+ "type": "text",
+ "fielddata": true,
+ "fielddata_frequency_filter": {
+ "min": 0.001,
+ "max": 0.1,
+ "min_segment_size": 500
+ }
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "number_one": {
+ "type": "integer",
+ "ignore_malformed": true
+ },
+ "number_two": {
+ "type": "integer"
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "text": "Some text value",
+ "number_one": "foo"
+}
+emit snippet
+catch part: request
+body part:
+{
+ "text": "Some text value",
+ "number_two": "foo"
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "index.mapping.ignore_malformed": true
+ },
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "number_one": {
+ "type": "byte"
+ },
+ "number_two": {
+ "type": "integer",
+ "ignore_malformed": false
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "username": "johnsmith",
+ "name": {
+ "first": "John",
+ "last": "Smith"
+ }
+}
+emit snippet
+emit snippet
+body part:
+{
+ "username": "marywhite",
+ "email": "mary@white.com",
+ "name": {
+ "first": "Mary",
+ "middle": "Alice",
+ "last": "White"
+ }
+}
+emit snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "dynamic": false,
+ "properties": {
+ "user": {
+ "properties": {
+ "name": {
+ "type": "text"
+ },
+ "social_networks": {
+ "dynamic": true,
+ "properties": {}
+ }
+ }
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "names": [ "John Abraham", "Lincoln Smith"]
+}
+emit snippet
+body part:
+{
+ "query": {
+ "match_phrase": {
+ "names": {
+ "query": "Abraham Lincoln"
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "query": {
+ "match_phrase": {
+ "names": {
+ "query": "Abraham Lincoln",
+ "slop": 101
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "groups": {
+ "properties": {
+ "names": {
+ "type": "text",
+ "position_increment_gap": 0
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "names": [ "John Abraham", "Lincoln Smith"]
+}
+emit snippet
+body part:
+{
+ "query": {
+ "match_phrase": {
+ "names": "Abraham Lincoln"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "message": {
+ "type": "keyword",
+ "ignore_above": 20
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "message": "Syntax error"
+}
+emit snippet
+body part:
+{
+ "message": "Syntax error with some long stacktrace"
+}
+emit snippet
+body part:
+{
+ "aggs": {
+ "messages": {
+ "terms": {
+ "field": "message"
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "location": {
+ "type": "geo_point",
+ "lat_lon": true
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "location": {
+ "lat": 41.12,
+ "lon": -71.34
+ }
+}
+emit snippet
+body part:
+{
+ "query": {
+ "geo_distance": {
+ "location": {
+ "lat": 41,
+ "lon": -71
+ },
+ "distance": "50km",
+ "optimize_bbox": "indexed"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "location": {
+ "type": "geo_point",
+ "geohash_prefix": true,
+ "geohash_precision": 6
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "location": {
+ "lat": 41.12,
+ "lon": -71.34
+ }
+}
+emit snippet
+query part: fielddata_fields=location.geohash
+body part:
+{
+ "query": {
+ "geohash_cell": {
+ "location": {
+ "lat": 41.02,
+ "lon": -71.48
+ },
+ "precision": 4,
+ "neighbors": true
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "status_code": {
+ "type": "keyword"
+ },
+ "session_id": {
+ "type": "keyword",
+ "doc_values": false
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "text": {
+ "type": "text",
+ "index_options": "offsets"
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "text": "Quick brown fox"
+}
+emit snippet
+body part:
+{
+ "query": {
+ "match": {
+ "text": "brown fox"
+ }
+ },
+ "highlight": {
+ "fields": {
+ "text": {}
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "manager": {
+ "properties": {
+ "age": { "type": "integer" },
+ "name": { "type": "text" }
+ }
+ },
+ "employees": {
+ "type": "nested",
+ "properties": {
+ "age": { "type": "integer" },
+ "name": { "type": "text" }
+ }
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "region": "US",
+ "manager": {
+ "name": "Alice White",
+ "age": 30
+ },
+ "employees": [
+ {
+ "name": "John Smith",
+ "age": 34
+ },
+ {
+ "name": "Peter Brown",
+ "age": 26
+ }
+ ]
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "match": {
+ "manager.name": "Alice White"
+ }
+ },
+ "aggs": {
+ "Employees": {
+ "nested": {
+ "path": "employees"
+ },
+ "aggs": {
+ "Employee Ages": {
+ "histogram": {
+ "field": "employees.age",
+ "interval": 5
+ }
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "title": {
+ "type": "text"
+ },
+ "content": {
+ "type": "text"
+ },
+ "date": {
+ "type": "date",
+ "include_in_all": false
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "include_in_all": false,
+ "properties": {
+ "title": { "type": "text" },
+ "author": {
+ "include_in_all": true,
+ "properties": {
+ "first_name": { "type": "text" },
+ "last_name": { "type": "text" }
+ }
+ },
+ "editor": {
+ "properties": {
+ "first_name": { "type": "text" },
+ "last_name": { "type": "text", "include_in_all": true }
+ }
+ }
+ }
+ }
+ }
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+emit snippet
+body part:
+{
+ "properties": {
+ "title": {
+ "type": "text",
+ "norms": false
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "title": {
+ "type": "text",
+ "boost": 2
+ },
+ "content": {
+ "type": "text"
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "match" : {
+ "title": {
+ "query": "quick brown fox"
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "match" : {
+ "title": {
+ "query": "quick brown fox",
+ "boost": 2
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "default_field": {
+ "type": "text"
+ },
+ "bm25_field": {
+ "type": "text",
+ "similarity": "BM25"
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "location": {
+ "type": "geo_point",
+ "geohash": true
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "location": {
+ "lat": 41.12,
+ "lon": -71.34
+ }
+}
+emit snippet
+query part: fielddata_fields=location.geohash
+body part:
+{
+ "query": {
+ "prefix": {
+ "location.geohash": "drm3b"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "text": {
+ "type": "text",
+ "fields": {
+ "english": {
+ "type": "text",
+ "analyzer": "english"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+emit snippet
+query part: wait_for_status=yellow
+emit snippet
+query part: field=text
+body part:
+{
+ "text": "The quick Brown Foxes."
+}
+emit snippet
+query part: field=text.english
+body part:
+{
+ "text": "The quick Brown Foxes."
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "settings":{
+ "analysis":{
+ "analyzer":{
+ "my_analyzer":{
+ "type":"custom",
+ "tokenizer":"standard",
+ "filter":[
+ "lowercase"
+ ]
+ },
+ "my_stop_analyzer":{
+ "type":"custom",
+ "tokenizer":"standard",
+ "filter":[
+ "lowercase",
+ "english_stop"
+ ]
+ }
+ },
+ "filter":{
+ "english_stop":{
+ "type":"stop",
+ "stopwords":"_english_"
+ }
+ }
+ }
+ },
+ "mappings":{
+ "my_type":{
+ "properties":{
+ "title": {
+ "type":"text",
+ "analyzer":"my_analyzer",
+ "search_analyzer":"my_stop_analyzer",
+ "search_quote_analyzer":"my_analyzer"
+ }
+ }
+ }
+ }
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "region": "US",
+ "manager": {
+ "age": 30,
+ "name": {
+ "first": "John",
+ "last": "Smith"
+ }
+ }
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "region": {
+ "type": "keyword"
+ },
+ "manager": {
+ "properties": {
+ "age": { "type": "integer" },
+ "name": {
+ "properties": {
+ "first": { "type": "text" },
+ "last": { "type": "text" }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "date": {
+ "type": "date"
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{ "date": "2015-01-01" }
+emit snippet
+body part:
+{ "date": "2015-01-01T12:10:30Z" }
+emit snippet
+body part:
+{ "date": 1420070400001 }
+emit snippet
+body part:
+{
+ "sort": { "date": "asc"}
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "date": {
+ "type": "date",
+ "format": "yyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "full_name": {
+ "type": "text"
+ }
+ }
+ }
+ }
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "name": {
+ "type": "text",
+ "fields": {
+ "length": {
+ "type": "token_count",
+ "analyzer": "standard"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{ "name": "John Smith" }
+emit snippet
+body part:
+{ "name": "Rachel Alice Williams" }
+emit snippet
+body part:
+{
+ "query": {
+ "term": {
+ "name.length": 3
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "group" : "fans",
+ "user" : [
+ {
+ "first" : "John",
+ "last" : "Smith"
+ },
+ {
+ "first" : "Alice",
+ "last" : "White"
+ }
+ ]
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "bool": {
+ "must": [
+ { "match": { "user.first": "Alice" }},
+ { "match": { "user.last": "Smith" }}
+ ]
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "user": {
+ "type": "nested"
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "group" : "fans",
+ "user" : [
+ {
+ "first" : "John",
+ "last" : "Smith"
+ },
+ {
+ "first" : "Alice",
+ "last" : "White"
+ }
+ ]
+}
+emit snippet
+body part:
+{
+ "query": {
+ "nested": {
+ "path": "user",
+ "query": {
+ "bool": {
+ "must": [
+ { "match": { "user.first": "Alice" }},
+ { "match": { "user.last": "Smith" }}
+ ]
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "query": {
+ "nested": {
+ "path": "user",
+ "query": {
+ "bool": {
+ "must": [
+ { "match": { "user.first": "Alice" }},
+ { "match": { "user.last": "White" }}
+ ]
+ }
+ },
+ "inner_hits": {
+ "highlight": {
+ "fields": {
+ "user.first": {}
+ }
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "is_published": {
+ "type": "boolean"
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "is_published": true
+}
+emit snippet
+body part:
+{
+ "query": {
+ "term": {
+ "is_published": 1
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "is_published": true
+}
+emit snippet
+body part:
+{
+ "is_published": false
+}
+emit snippet
+body part:
+{
+ "aggs": {
+ "publish_state": {
+ "terms": {
+ "field": "is_published"
+ }
+ }
+ },
+ "script_fields": {
+ "is_published": {
+ "script": "doc['is_published'].value"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "number_of_bytes": {
+ "type": "integer"
+ },
+ "time_in_seconds": {
+ "type": "float"
+ }
+ }
+ }
+ }
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "tags": {
+ "type": "keyword"
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "location": {
+ "type": "geo_point"
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "text": "Geo-point as an object",
+ "location": {
+ "lat": 41.12,
+ "lon": -71.34
+ }
+}
+emit snippet
+body part:
+{
+ "text": "Geo-point as a string",
+ "location": "41.12,-71.34"
+}
+emit snippet
+body part:
+{
+ "text": "Geo-point as a geohash",
+ "location": "drm3btev3e86"
+}
+emit snippet
+body part:
+{
+ "text": "Geo-point as an array",
+ "location": [ -71.34, 41.12 ]
+}
+emit snippet
+body part:
+{
+ "query": {
+ "geo_bounding_box": {
+ "location": {
+ "top_left": {
+ "lat": 42,
+ "lon": -72
+ },
+ "bottom_right": {
+ "lat": 40,
+ "lon": -74
+ }
+ }
+ }
+ }
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "message": "some arrays in this document...",
+ "tags": [ "elasticsearch", "wow" ],
+ "lists": [
+ {
+ "name": "prog_list",
+ "description": "programming list"
+ },
+ {
+ "name": "cool_list",
+ "description": "cool stuff list"
+ }
+ ]
+}
+emit snippet
+body part:
+{
+ "message": "no arrays in this document...",
+ "tags": "elasticsearch",
+ "lists": {
+ "name": "prog_list",
+ "description": "programming list"
+ }
+}
+emit snippet
+body part:
+{
+ "query": {
+ "match": {
+ "tags": "elasticsearch"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "properties": {
+ "ip_addr": {
+ "type": "ip"
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "ip_addr": "192.168.1.1"
+}
+emit snippet
+body part:
+{
+ "query": {
+ "term": {
+ "ip_addr": "192.168.0.0/16"
+ }
+ }
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "dynamic_templates": [
+ {
+ "integers": {
+ "match_mapping_type": "long",
+ "mapping": {
+ "type": "integer"
+ }
+ }
+ },
+ {
+ "strings": {
+ "match_mapping_type": "string",
+ "mapping": {
+ "type": "text",
+ "fields": {
+ "raw": {
+ "type": "keyword",
+ "ignore_above": 256
+ }
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "my_integer": 5,
+ "my_string": "Some string"
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "dynamic_templates": [
+ {
+ "longs_as_strings": {
+ "match_mapping_type": "string",
+ "match": "long_*",
+ "unmatch": "*_text",
+ "mapping": {
+ "type": "long"
+ }
+ }
+ }
+ ]
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "long_num": "5",
+ "long_text": "foo"
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "dynamic_templates": [
+ {
+ "full_name": {
+ "path_match": "name.*",
+ "path_unmatch": "*.middle",
+ "mapping": {
+ "type": "text",
+ "copy_to": "full_name"
+ }
+ }
+ }
+ ]
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "name": {
+ "first": "Alice",
+ "middle": "Mary",
+ "last": "White"
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "dynamic_templates": [
+ {
+ "named_analyzers": {
+ "match_mapping_type": "string",
+ "match": "*",
+ "mapping": {
+ "type": "text",
+ "analyzer": "{name}"
+ }
+ }
+ },
+ {
+ "no_doc_values": {
+ "match_mapping_type":"*",
+ "mapping": {
+ "type": "{dynamic_type}",
+ "doc_values": false
+ }
+ }
+ }
+ ]
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "english": "Some English text",
+ "count": 5
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "order": 0,
+ "template": "*",
+ "mappings": {
+ "_default_": {
+ "_all": {
+ "enabled": false
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "create_date": "2015/09/02"
+}
+emit snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "date_detection": false
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "create": "2015/09/02"
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "dynamic_date_formats": ["MM/dd/yyyy"]
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "create_date": "09/25/2015"
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "numeric_detection": true
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "my_float": "1.0",
+ "my_integer": "1"
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "_default_": {
+ "_all": {
+ "enabled": false
+ }
+ },
+ "user": {},
+ "blogpost": {
+ "_all": {
+ "enabled": true
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "template": "logs-*",
+ "settings": { "number_of_shards": 1 },
+ "mappings": {
+ "_default_": {
+ "_all": {
+ "enabled": false
+ },
+ "dynamic_templates": [
+ {
+ "strings": {
+ "match_mapping_type": "string",
+ "mapping": {
+ "type": "text",
+ "fields": {
+ "raw": {
+ "type": "keyword",
+ "ignore_above": 256
+ }
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
+emit snippet
+body part:
+{ "message": "error:16" }
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "_timestamp": {
+ "enabled": true
+ }
+ }
+ }
+}
+emit snippet
+query part: timestamp=2015-01-01
+body part:
+{ "text": "Timestamp as a formatted date" }
+emit snippet
+query part: timestamp=1420070400000
+body part:
+{ "text": "Timestamp as milliseconds since the epoch" }
+emit snippet
+body part:
+{ "text": "Autogenerated timestamp set to now()" }
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "range": {
+ "_timestamp": {
+ "gte": "2015-01-01"
+ }
+ }
+ },
+ "aggs": {
+ "Timestamps": {
+ "terms": {
+ "field": "_timestamp",
+ "size": 10
+ }
+ }
+ },
+ "sort": [
+ {
+ "_timestamp": {
+ "order": "desc"
+ }
+ }
+ ],
+ "script_fields": {
+ "Timestamp": {
+ "script": "doc['_timestamp']"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "first_name": "John",
+ "last_name": "Smith",
+ "date_of_birth": "1970-10-24"
+}
+emit snippet
+body part:
+{
+ "query": {
+ "match": {
+ "_all": "john smith 1970"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "query_string": {
+ "query": "john smith 1970"
+ }
+ }
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "type_1": {
+ "properties": {}
+ },
+ "type_2": {
+ "_all": {
+ "enabled": false
+ },
+ "properties": {}
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "_all": {
+ "enabled": false
+ },
+ "properties": {
+ "content": {
+ "type": "text"
+ }
+ }
+ }
+ },
+ "settings": {
+ "index.query.default_field": "content"
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "mytype": {
+ "properties": {
+ "title": {
+ "type": "text",
+ "boost": 2
+ },
+ "content": {
+ "type": "text"
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "mytype": {
+ "properties": {
+ "first_name": {
+ "type": "text",
+ "copy_to": "full_name"
+ },
+ "last_name": {
+ "type": "text",
+ "copy_to": "full_name"
+ },
+ "full_name": {
+ "type": "text"
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "first_name": "John",
+ "last_name": "Smith"
+}
+emit snippet
+body part:
+{
+ "query": {
+ "match": {
+ "full_name": "John Smith"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "mytype": {
+ "_all": {
+ "store": true
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "first_name": "John",
+ "last_name": "Smith"
+}
+emit snippet
+body part:
+{
+ "query": {
+ "match": {
+ "_all": "John Smith"
+ }
+ },
+ "highlight": {
+ "fields": {
+ "_all": {}
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "mytype": {
+ "_all": {}
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "first_name": "John",
+ "last_name": "Smith"
+}
+emit snippet
+body part:
+{
+ "query": {
+ "match": {
+ "_all": "John Smith"
+ }
+ },
+ "highlight": {
+ "fields": {
+ "*_name": {
+ "require_field_match": false
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "title": "This is a document"
+}
+emit snippet
+body part:
+{
+ "title": "This is another document",
+ "body": "This document has a body"
+}
+emit snippet
+body part:
+{
+ "query": {
+ "terms": {
+ "_field_names": [ "title" ]
+ }
+ },
+ "script_fields": {
+ "Field names": {
+ "script": "doc['_field_names']"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "text": "Document in index 1"
+}
+emit snippet
+body part:
+{
+ "text": "Document in index 2"
+}
+emit snippet
+body part:
+{
+ "query": {
+ "terms": {
+ "_index": ["index_1", "index_2"]
+ }
+ },
+ "aggs": {
+ "indices": {
+ "terms": {
+ "field": "_index",
+ "size": 10
+ }
+ }
+ },
+ "sort": [
+ {
+ "_index": {
+ "order": "asc"
+ }
+ }
+ ],
+ "script_fields": {
+ "index_name": {
+ "script": "doc['_index']"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "tweet": {
+ "_source": {
+ "enabled": false
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "event": {
+ "_source": {
+ "includes": [
+ "*.count",
+ "meta.*"
+ ],
+ "excludes": [
+ "meta.description",
+ "meta.other.*"
+ ]
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "requests": {
+ "count": 10,
+ "foo": "bar"
+ },
+ "meta": {
+ "name": "Some metric",
+ "description": "Some metric description",
+ "other": {
+ "foo": "one",
+ "baz": "two"
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "query": {
+ "match": {
+ "meta.other.foo": "one"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "text": "Document with type 1"
+}
+emit snippet
+body part:
+{
+ "text": "Document with type 2"
+}
+emit snippet
+body part:
+{
+ "query": {
+ "terms": {
+ "_type": [ "type_1", "type_2" ]
+ }
+ },
+ "aggs": {
+ "types": {
+ "terms": {
+ "field": "_type",
+ "size": 10
+ }
+ }
+ },
+ "sort": [
+ {
+ "_type": {
+ "order": "desc"
+ }
+ }
+ ],
+ "script_fields": {
+ "type": {
+ "script": "doc['_type']"
+ }
+ }
+}
+handle snippet
+null
+emit snippet
+query part: routing=user1
+body part:
+{
+ "title": "This is a document"
+}
+emit snippet
+query part: routing=user1
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "terms": {
+ "_routing": [ "user1" ]
+ }
+ },
+ "script_fields": {
+ "Routing value": {
+ "script": "doc['_routing']"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+query part: routing=user1,user2
+body part:
+{
+ "query": {
+ "match": {
+ "title": "document"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "_routing": {
+ "required": true
+ }
+ }
+ }
+}
+emit snippet
+catch part: request
+body part:
+{
+ "text": "No routing value provided"
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "_ttl": {
+ "enabled": true
+ }
+ }
+ }
+}
+emit snippet
+query part: ttl=10m
+body part:
+{
+ "text": "Will expire in 10 minutes"
+}
+emit snippet
+body part:
+{
+ "text": "Will not expire"
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_type": {
+ "_ttl": {
+ "enabled": true,
+ "default": "5m"
+ }
+ }
+ }
+}
+emit snippet
+query part: ttl=10m
+body part:
+{
+ "text": "Will expire in 10 minutes"
+}
+emit snippet
+body part:
+{
+ "text": "Will expire in 5 minutes"
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_parent": {},
+ "my_child": {
+ "_parent": {
+ "type": "my_parent"
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "text": "This is a parent document"
+}
+emit snippet
+query part: parent=1
+body part:
+{
+ "text": "This is a child document"
+}
+emit snippet
+query part: parent=1
+body part:
+{
+ "text": "This is another child document"
+}
+emit snippet
+body part:
+{
+ "query": {
+ "has_child": {
+ "type": "my_child",
+ "query": {
+ "match": {
+ "text": "child document"
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "query": {
+ "terms": {
+ "_parent": [ "1" ]
+ }
+ },
+ "aggs": {
+ "parents": {
+ "terms": {
+ "field": "_parent",
+ "size": 10
+ }
+ }
+ },
+ "script_fields": {
+ "parent": {
+ "script": "doc['_parent']"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "my_parent": {},
+ "my_child": {
+ "_parent": {
+ "type": "my_parent",
+ "eager_global_ordinals": true
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+query part: human&fields=_parent
+emit snippet
+query part: human&fields=_parent
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "text": "Document with ID 1"
+}
+emit snippet
+body part:
+{
+ "text": "Document with ID 2"
+}
+emit snippet
+body part:
+{
+ "query": {
+ "terms": {
+ "_id": [ "1", "2" ]
+ }
+ },
+ "script_fields": {
+ "UID": {
+ "script": "doc['_id']"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "text": "Document with ID 1"
+}
+emit snippet
+body part:
+{
+ "text": "Document with ID 2"
+}
+emit snippet
+body part:
+{
+ "query": {
+ "terms": {
+ "_uid": [ "my_type#1", "my_type#2" ]
+ }
+ },
+ "aggs": {
+ "UIDs": {
+ "terms": {
+ "field": "_uid",
+ "size": 10
+ }
+ }
+ },
+ "sort": [
+ {
+ "_uid": {
+ "order": "desc"
+ }
+ }
+ ],
+ "script_fields": {
+ "UID": {
+ "script": "doc['_uid']"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "user": {
+ "_meta": {
+ "class": "MyApp::User",
+ "version": {
+ "min": "1.0",
+ "max": "1.3"
+ }
+ }
+ }
+ }
+}
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+emit snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "index.priority": 10
+ }
+}
+emit snippet
+body part:
+{
+ "settings": {
+ "index.priority": 5
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "index.priority": 1
+}
+handle snippet
+test snippet
+emit snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "index.unassigned.node_left.delayed_timeout": "5m"
+ }
+}
+handle snippet
+test snippet
+emit snippet
+handle snippet
+test snippet
+emit snippet
+emit snippet
+body part:
+{
+ "settings": {
+ "index.unassigned.node_left.delayed_timeout": "0"
+ }
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+emit snippet
+body part:
+{
+ "index.routing.allocation.include.size": "big,medium"
+}
+handle snippet
+test snippet
+emit snippet
+emit snippet
+body part:
+{
+ "index.routing.allocation.exclude.size": "small"
+}
+handle snippet
+test snippet
+emit snippet
+emit snippet
+body part:
+{
+ "index.routing.allocation.include.size": "big",
+ "index.routing.allocation.include.rack": "rack1"
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "index.routing.allocation.include._ip": "192.168.2.*"
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "tokenizer" : "standard",
+ "token_filter" : ["snowball"],
+ "text" : "detailed output",
+ "explain" : true,
+ "attributes" : ["keyword"]
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "template": "te*",
+ "settings": {
+ "number_of_shards": 1
+ },
+ "mappings": {
+ "type1": {
+ "_source": {
+ "enabled": false
+ },
+ "properties": {
+ "host_name": {
+ "type": "keyword"
+ },
+ "created_at": {
+ "type": "date",
+ "format": "EEE MMM dd HH:mm:ss Z YYYY"
+ }
+ }
+ }
+ }
+}
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "tweet": {
+ "properties": {
+ "message": {
+ "type": "text"
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "properties": {
+ "name": {
+ "type": "text"
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "properties": {
+ "user_name": {
+ "type": "text"
+ }
+ }
+}
+handle snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "user": {
+ "properties": {
+ "name": {
+ "properties": {
+ "first": {
+ "type": "text"
+ }
+ }
+ },
+ "user_id": {
+ "type": "keyword"
+ }
+ }
+ }
+ }
+}
+emit snippet
+body part:
+{
+ "properties": {
+ "name": {
+ "properties": {
+ "last": {
+ "type": "text"
+ }
+ }
+ },
+ "user_id": {
+ "type": "keyword",
+ "ignore_above": 100
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "type_one": {
+ "properties": {
+ "text": {
+ "type": "text",
+ "analyzer": "standard"
+ }
+ }
+ },
+ "type_two": {
+ "properties": {
+ "text": {
+ "type": "text",
+ "analyzer": "standard"
+ }
+ }
+ }
+ }
+}
+emit snippet
+catch part: request
+body part:
+{
+ "properties": {
+ "text": {
+ "type": "text",
+ "analyzer": "standard",
+ "search_analyzer": "whitespace"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+query part: update_all_types
+body part:
+{
+ "properties": {
+ "text": {
+ "type": "text",
+ "analyzer": "standard",
+ "search_analyzer": "whitespace"
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+emit snippet
+body part:
+{
+ "actions" : [
+ { "add" : { "index" : "test1", "alias" : "alias1" } }
+ ]
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "actions" : [
+ { "remove" : { "index" : "test1", "alias" : "alias1" } }
+ ]
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "actions" : [
+ { "remove" : { "index" : "test1", "alias" : "alias1" } },
+ { "add" : { "index" : "test1", "alias" : "alias2" } }
+ ]
+}
+handle snippet
+test snippet
+emit snippet
+emit snippet
+emit snippet
+body part:
+{
+ "actions" : [
+ { "add" : { "index" : "test1", "alias" : "alias1" } },
+ { "add" : { "index" : "test2", "alias" : "alias1" } }
+ ]
+}
+handle snippet
+test snippet
+emit snippet
+emit snippet
+emit snippet
+body part:
+{
+ "actions" : [
+ { "add" : { "indices" : ["test1", "test2"], "alias" : "alias1" } }
+ ]
+}
+handle snippet
+test snippet
+emit snippet
+emit snippet
+emit snippet
+body part:
+{
+ "actions" : [
+ { "add" : { "index" : "test*", "alias" : "all_test_indices" } }
+ ]
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings": {
+ "type1": {
+ "properties": {
+ "user" : {
+ "type": "keyword"
+ }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "actions" : [
+ {
+ "add" : {
+ "index" : "test1",
+ "alias" : "alias2",
+ "filter" : { "term" : { "user" : "kimchy" } }
+ }
+ }
+ ]
+}
+handle snippet
+test snippet
+emit snippet
+emit snippet
+body part:
+{
+ "actions" : [
+ {
+ "add" : {
+ "index" : "test",
+ "alias" : "alias1",
+ "routing" : "1"
+ }
+ }
+ ]
+}
+handle snippet
+test snippet
+emit snippet
+emit snippet
+body part:
+{
+ "actions" : [
+ {
+ "add" : {
+ "index" : "test",
+ "alias" : "alias2",
+ "search_routing" : "1,2",
+ "index_routing" : "2"
+ }
+ }
+ ]
+}
+handle snippet
+test snippet
+emit snippet
+query part: q=user:kimchy&routing=2,3
+handle snippet
+test snippet
+emit snippet
+emit snippet
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings" : {
+ "user" : {
+ "properties" : {
+ "user_id" : {"type" : "integer"}
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "routing" : "12",
+ "filter" : {
+ "term" : {
+ "user_id" : 12
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+body part:
+{
+ "mappings" : {
+ "type" : {
+ "properties" : {
+ "year" : {"type" : "integer"}
+ }
+ }
+ },
+ "aliases" : {
+ "current_day" : {},
+ "2016" : {
+ "filter" : {
+ "term" : {"year" : 2016 }
+ }
+ }
+ }
+}
+handle snippet
+test snippet
+emit snippet
+handle snippet
+test snippet
+emit snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+emit snippet
+emit snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+
+ - do:
+ bulk:
+ index: twitter
+ type: tweet
+ refresh: true
+ body: |
+ {"index":{"_id": "0"}}
+ {"user": "kimchy", "message": "trying out Elasticsearch", "date": "2009-11-15T14:12:12", "likes": 0}
+ {"index":{"_id": "1"}}
+ {"user": "test", "message": "some message with the number 1", "date": "2009-11-15T14:12:12", "likes": 1}
+ {"index":{"_id": "2"}}
+ {"user": "test", "message": "some message with the number 2", "date": "2009-11-15T14:12:12", "likes": 2}
+ {"index":{"_id": "3"}}
+ {"user": "test", "message": "some message with the number 3", "date": "2009-11-15T14:12:12", "likes": 3}
+ {"index":{"_id": "4"}}
+ {"user": "test", "message": "some message with the number 4", "date": "2009-11-15T14:12:12", "likes": 4}
+emit snippet
+handle snippet
+test snippet
+emit snippet
+emit snippet
+emit snippet
+emit snippet
+handle snippet
+test snippet
+emit snippet
+emit snippet
+query part: level=shards
+handle snippet
+handle snippet
+test snippet
+
+ - do:
+ bulk:
+ index: twitter
+ type: tweet
+ refresh: true
+ body: |
+ {"index":{"_id": "0"}}
+ {"user": "kimchy", "message": "trying out Elasticsearch", "date": "2009-11-15T14:12:12", "likes": 0}
+ {"index":{"_id": "1"}}
+ {"user": "test", "message": "some message with the number 1", "date": "2009-11-15T14:12:12", "likes": 1}
+ {"index":{"_id": "2"}}
+ {"user": "test", "message": "some message with the number 2", "date": "2009-11-15T14:12:12", "likes": 2}
+ {"index":{"_id": "3"}}
+ {"user": "test", "message": "some message with the number 3", "date": "2009-11-15T14:12:12", "likes": 3}
+ {"index":{"_id": "4"}}
+ {"user": "test", "message": "some message with the number 4", "date": "2009-11-15T14:12:12", "likes": 4}
+emit snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+test snippet
+emit snippet
+emit snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+handle snippet
+:core:compileJava UP-TO-DATE
+:core:generateModulesList UP-TO-DATE
+:core:generatePluginsList UP-TO-DATE
+:core:processResources UP-TO-DATE
+:core:classes UP-TO-DATE
+:core:jar UP-TO-DATE
+:test:framework:compileJava UP-TO-DATE
+:test:framework:processResources UP-TO-DATE
+:test:framework:classes UP-TO-DATE
+:test:framework:jar UP-TO-DATE
+:docs:compileTestJava
+:docs:testClasses
+:docs:integTest#prepareCluster.cleanShared
+:docs:integTest#clean
+:docs:integTest#checkPrevious SKIPPED
+:docs:integTest#stopPrevious SKIPPED
+:modules:aggs-matrix-stats:compileJava UP-TO-DATE
+:modules:aggs-matrix-stats:processResources UP-TO-DATE
+:modules:aggs-matrix-stats:classes UP-TO-DATE
+:modules:aggs-matrix-stats:jar UP-TO-DATE
+:modules:aggs-matrix-stats:copyPluginPropertiesTemplate
+:modules:aggs-matrix-stats:pluginProperties UP-TO-DATE
+:modules:aggs-matrix-stats:bundlePlugin UP-TO-DATE
+:modules:ingest-grok:compileJava UP-TO-DATE
+:modules:ingest-grok:processResources UP-TO-DATE
+:modules:ingest-grok:classes UP-TO-DATE
+:modules:ingest-grok:jar UP-TO-DATE
+:modules:ingest-grok:copyPluginPropertiesTemplate
+:modules:ingest-grok:pluginProperties UP-TO-DATE
+:modules:ingest-grok:bundlePlugin UP-TO-DATE
+:modules:lang-expression:compileJava UP-TO-DATE
+:modules:lang-expression:processResources UP-TO-DATE
+:modules:lang-expression:classes UP-TO-DATE
+:modules:lang-expression:jar UP-TO-DATE
+:modules:lang-expression:copyPluginPropertiesTemplate
+:modules:lang-expression:pluginProperties UP-TO-DATE
+:modules:lang-expression:bundlePlugin UP-TO-DATE
+:modules:lang-groovy:compileJava UP-TO-DATE
+:modules:lang-groovy:processResources UP-TO-DATE
+:modules:lang-groovy:classes UP-TO-DATE
+:modules:lang-groovy:jar UP-TO-DATE
+:modules:lang-groovy:copyPluginPropertiesTemplate
+:modules:lang-groovy:pluginProperties UP-TO-DATE
+:modules:lang-groovy:bundlePlugin UP-TO-DATE
+:modules:lang-mustache:compileJava UP-TO-DATE
+:modules:lang-mustache:processResources UP-TO-DATE
+:modules:lang-mustache:classes UP-TO-DATE
+:modules:lang-mustache:jar UP-TO-DATE
+:modules:lang-mustache:copyPluginPropertiesTemplate
+:modules:lang-mustache:pluginProperties UP-TO-DATE
+:modules:lang-mustache:bundlePlugin UP-TO-DATE
+:modules:lang-painless:compileJava UP-TO-DATE
+:modules:lang-painless:processResources UP-TO-DATE
+:modules:lang-painless:classes UP-TO-DATE
+:modules:lang-painless:jar UP-TO-DATE
+:modules:lang-painless:copyPluginPropertiesTemplate
+:modules:lang-painless:pluginProperties UP-TO-DATE
+:modules:lang-painless:bundlePlugin UP-TO-DATE
+:modules:percolator:compileJava UP-TO-DATE
+:modules:percolator:processResources UP-TO-DATE
+:modules:percolator:classes UP-TO-DATE
+:modules:percolator:jar UP-TO-DATE
+:modules:percolator:copyPluginPropertiesTemplate
+:modules:percolator:pluginProperties UP-TO-DATE
+:modules:percolator:bundlePlugin UP-TO-DATE
+:modules:reindex:compileJava UP-TO-DATE
+:modules:reindex:processResources UP-TO-DATE
+:modules:reindex:classes UP-TO-DATE
+:modules:reindex:jar UP-TO-DATE
+:modules:reindex:copyPluginPropertiesTemplate
+:modules:reindex:pluginProperties UP-TO-DATE
+:modules:reindex:bundlePlugin UP-TO-DATE
+:distribution:buildModules UP-TO-DATE
+:distribution:zip:buildZip UP-TO-DATE
+:docs:integTest#extract
+:docs:integTest#configure
+:docs:integTest#start
+:docs:integTest#wait
+:docs:integTest
+ [junit4] says ahoj! Master seed: E40438BBAF23DBE2
+==> Test Info: seed=E40438BBAF23DBE2; jvm=1; suite=1
+Suite: org.elasticsearch.smoketest.SmokeTestDocsIT
+==> Test Summary: 1 suite (1 ignored), 0 tests
+ [junit4] JVM J0: 0.30 .. 1.64 = 1.35s
+ [junit4] Execution time total: 1.66 sec.
+ [junit4] Tests summary: 1 suite (1 ignored), 0 tests
+:docs:integTest FAILED
+:docs:integTest#stop
+
+BUILD FAILED
+
+Total time: 22.834 secs
+
+BUILD SUCCESSFUL
+Total time: 1 second
diff --git a/docs/reference/query-dsl/nested-query.asciidoc b/docs/reference/query-dsl/nested-query.asciidoc
index 6e990e07f91..176473174dd 100644
--- a/docs/reference/query-dsl/nested-query.asciidoc
+++ b/docs/reference/query-dsl/nested-query.asciidoc
@@ -23,7 +23,6 @@ PUT /my_index
}
}
-GET _cluster/health?wait_for_status=yellow
--------------------------------------------------
// CONSOLE
// TESTSETUP
diff --git a/docs/reference/query-dsl/parent-id-query.asciidoc b/docs/reference/query-dsl/parent-id-query.asciidoc
index 8ea07a6d0b7..a7a28cf88e8 100644
--- a/docs/reference/query-dsl/parent-id-query.asciidoc
+++ b/docs/reference/query-dsl/parent-id-query.asciidoc
@@ -29,7 +29,6 @@ PUT /my_index
}
}
-GET /_cluster/health?wait_for_status=yellow
------------------------------------------
// CONSOLE
// TESTSETUP