如何获取文件的elasticsearch索引,然后将该数据插入另一个集群?我想将数据从一个集群移动到另一个集群但我无法直接连接它们.
我想问一下如何让我的网址包含我搜索的内容.像这样的东西:
http://host/filter?test
Run Code Online (Sandbox Code Playgroud)
我的代码:
@app.route('/filter', methods=['POST', 'GET'])
def filter():
if request.method == 'POST':
if str(request.form['search_string']) <> '':
api.queryMessage(request.form['search_string'])
return render_template('main.html', search_string=search_string)
Run Code Online (Sandbox Code Playgroud)
我的模板,main.html:
<form name="filters" action="{{ url_for('filter') }}" method=post id="filters">
<div style="position: absolute; top:100px; left:300px">
<p>Search string: <input type=text size=80 title="Match all of the words" name=search_string value="{{search_string}}"></p>
<input type=submit value=Filter/Search onclick=loopSelected();>
<input type="hidden" name="chosen" id="chosen" value="{{chosen}}" />
</div>
</form>
Run Code Online (Sandbox Code Playgroud) 如何拆分每行的列表列表?
list = [['a', 'b', 'c'], ['d', 'e', 'f'], ['g', 'h', 'i']]
Run Code Online (Sandbox Code Playgroud)
成:
a b c
d e f
g h i
Run Code Online (Sandbox Code Playgroud)