Skip to content

Instantly share code, notes, and snippets.

@cbismuth
Last active November 28, 2018 17:51
Embed
What would you like to do?
cURL recreation script output to reproduce Elaticsearch issue #34142
[11-28-18 18:51:17] Delete [attachment] pipeline
{"acknowledged":true}
[11-28-18 18:51:17] Create [attachment] pipeline
{"acknowledged":true}
[11-28-18 18:51:17] Delete [index1] index
{"acknowledged":true}
[11-28-18 18:51:17] Create [index1] index
{"acknowledged":true,"shards_acknowledged":true,"index":"index1"}
[11-28-18 18:51:17] Create doc [1] index (with 'foo bar baz' as address, message and content)
{"_index":"index1","_type":"type1","_id":"1","_version":1,"result":"created","forced_refresh":true,"_shards":{"total":2,"successful":1,"failed":0},"_seq_no":0,"_primary_term":1}
[11-28-18 18:51:18] Print [index1]/[type1] mapping
{
"index1" : {
"mappings" : {
"type1" : {
"properties" : {
"address" : {
"type" : "text"
},
"attachment" : {
"properties" : {
"content" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"content_length" : {
"type" : "long"
},
"content_type" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"language" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
}
}
},
"data" : {
"type" : "text"
},
"message" : {
"type" : "text"
},
"title" : {
"type" : "text"
}
}
}
}
}
}
[11-28-18 18:51:18] Get doc [1] from index [index1]
{
"_index" : "index1",
"_type" : "type1",
"_id" : "1",
"_version" : 1,
"found" : true,
"_source" : {
"address" : "foo bar baz",
"data" : "Zm9vIGJhciBiYXo=",
"attachment" : {
"content_type" : "text/plain; charset=ISO-8859-1",
"language" : "is",
"content" : "foo bar baz",
"content_length" : 12
},
"title" : "title1",
"message" : "foo bar baz"
}
}
[11-28-18 18:51:18] Explain query
{
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"valid" : true,
"explanations" : [
{
"index" : "index1",
"valid" : true,
"explanation" : "+title:title1 +(((attachment.content:foo | message:foo | address:foo) (attachment.content:bar | message:bar | address:bar) (attachment.content:baz | message:baz | address:baz) (attachment.content:azerty | message:azerty | address:azerty) (attachment.content:qwerty | message:qwerty | address:qwerty) (attachment.content:elastic | message:elastic | address:elastic) (attachment.content:lucene | message:lucene | address:lucene))~4)"
}
]
}
[11-28-18 18:51:18] Search hits from query
{
"took" : 4,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" : [ ]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment