擅长:python、mysql、java
<p>这里有一个想法:</p>
<pre><code>r = requests.post(url,
data="\n".join(
[json.dumps(elem) for elem in payload]
)+"\n",
headers={'Content-Type': 'application/x-ndjson'})
</code></pre>
<p><code>Accept: text/plain</code>是一个<a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html#search-multi-search-api-desc" rel="nofollow noreferrer">unnecessary workaround</a></p>