Created
April 25, 2019 17:41
-
-
Save andrewsmedina/536c54b327b4df4d61a68627d590bbc9 to your computer and use it in GitHub Desktop.
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
from elasticsearch import Elasticsearch | |
query = { | |
"query": { | |
"bool": { | |
"should": | |
[ | |
{ | |
"term": { | |
"id-topico": "" | |
} | |
}, | |
{ | |
"term": { | |
"id-topico": "64615390" | |
} | |
} | |
] | |
} | |
} | |
} | |
client = Elasticsearch("http://35.188.136.37:9200") | |
result = client.search( | |
index="topicoindex3", | |
body=query, | |
size=1000, | |
_source_include=["id-topico", "titulo"], | |
) | |
import pdb; pdb.set_trace() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment