Skip to content

Instantly share code, notes, and snippets.

@laurikari
Created December 6, 2013 13:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laurikari/7824057 to your computer and use it in GitHub Desktop.
Save laurikari/7824057 to your computer and use it in GitHub Desktop.
Run this a few times and observe how matched_filters is randomly present in the results.
curl -XDELETE "http://localhost:9200/bug"
curl -XPOST "http://localhost:9200/bug/article/" -d '{"content": "Lorem ipsum dolor sit amet"}'
curl -XPOST "http://localhost:9200/bug/article/" -d '{"content": "consectetur adipisicing elit"}'
curl -XPOST "http://localhost:9200/bug/_refresh"
curl -XPOST "http://localhost:9200/bug/article/_search?pretty=true" -d '
{
"query":{
"bool":{
"minimum_should_match": 1,
"should":[
{
"query_string":{
"query": "dolor",
"_name": "dolor"
}
},
{
"query_string":{
"query": "elit",
"_name": "elit"
}
}
]
}
}
}
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment