use variable instead of magic number

This commit is contained in:
Patrick Jentsch 2020-03-12 14:18:38 +01:00
parent f4ac584668
commit b6ffad1ae4

View File

@ -45,9 +45,10 @@ def corpus_analysis_query(query):
else: else:
chunk_size = 500 chunk_size = 500
chunk_start = 0 chunk_start = 0
context = 100
while chunk_start < client.match_count: while chunk_start < client.match_count:
chunk = client.show_query_results(result_len=chunk_size, chunk = client.show_query_results(result_len=chunk_size,
context_len=100, context_len=context,
result_offset=chunk_start) result_offset=chunk_start)
socketio.emit('corpus_analysis_query', chunk, room=request.sid) socketio.emit('corpus_analysis_query', chunk, room=request.sid)
chunk_start += chunk_size chunk_start += chunk_size