Skip to content

Instantly share code, notes, and snippets.

@Kannanravindran
Created May 29, 2016 03:36
Show Gist options
  • Save Kannanravindran/99939faa6936e4ee91280ce75555a755 to your computer and use it in GitHub Desktop.
Save Kannanravindran/99939faa6936e4ee91280ce75555a755 to your computer and use it in GitHub Desktop.
import requests
url = 'http://ES_search_demo.com/document/record/_search?pretty=true'
data = '{"query":{"bool":{"must":[{"text":{"record.document":"SOME_JOURNAL"}},{"text":{"record.articleTitle":"farmers"}}],"must_not":[],"should":[]}},"from":0,"size":50,"sort":[],"facets":{}}'
response = requests.get(url, data=data)
response = request.post(url , data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment