Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
886 views
in Technique[技术] by (71.8m points)

jupyter notebook - how to perform scoll query in elasticsearch

I am using Es 6.8 and since my return doc for a query is >10K so i switch to use the scoll query

the query i make in Jupyter notebook is

response = es.search(
        body=query_body,
        scroll='5m' ) 
scroll_id = response['_scroll_id'] 
print(scroll_id) 
while len(response['hits']['hits']):
        response = es.scroll(scroll_id=scroll_id, scroll='10m')

however, it shows error :

RequestError(400, 'no handler found for uri [/test/id/_search/scroll?scroll=10m] and method [POST]', 'no handler found for uri [/test/id/_search/scroll?scroll=10m] and method [POST]') ?

it seems my second query appear an error.

question from:https://stackoverflow.com/questions/65540896/how-to-perform-scoll-query-in-elasticsearch

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...