Skip to content

Instantly share code, notes, and snippets.

@qhoxie
Created January 23, 2012 23:54
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 qhoxie/bcdeb73fb9b52b0f7564 to your computer and use it in GitHub Desktop.
Save qhoxie/bcdeb73fb9b52b0f7564 to your computer and use it in GitHub Desktop.
curl -X GET "http://localhost:9200/test/typeA/_search?pretty=true" -d '
{
"query": {
"query_string": {
"query": "test",
"fields": ["title", "title.snowball", "sections","sections.snowball"]
}
}
}'
curl -X GET "http://localhost:9200/test/typeB/_search?pretty=true" -d '
{
"query": {
"query_string": {
"query": "test",
"fields": ["body", "meta", "title", "title.snowball"]
}
}
}'
curl -X GET "http://localhost:9200/test/_search?pretty=true" -d '
{
typeA: {
"query": {
"query_string": {
"query": "test",
"fields": ["title", "title.snowball", "sections","sections.snowball"]
}
}
},
typeB: {
"query": {
"query_string": {
"query": "test",
"fields": ["body", "meta", "title", "title.snowball"]
}
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment