Created
December 6, 2013 13:45
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XDELETE "http://localhost:9200/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