From 53c66ed21652594c4eb3ca2a7563cb9f1d091688 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 6 Aug 2019 22:24:15 +0800 Subject: [PATCH] Update full.py --- plugins/solr/script/full.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/solr/script/full.py b/plugins/solr/script/full.py index d16aee18d..bd1ff1020 100755 --- a/plugins/solr/script/full.py +++ b/plugins/solr/script/full.py @@ -48,9 +48,9 @@ def execShell(cmdstring, cwd=None, timeout=None, shell=True): return sub.communicate() - -for x in xrange(1, count / 100 + 1): - y = x * 100 - cmd = 'curl --basic -u admin:admin "http://127.0.0.1:8983/solr/sodht/dataimport?command=full-import&wt=json&clean=false&commit=true&length=100&offset=' + \ +length = 100 +for x in xrange(1, count / length + 1): + y = x * length + cmd = 'curl --basic -u admin:admin "http://127.0.0.1:8983/solr/sodht/dataimport?command=full-import&wt=json&clean=false&commit=true&length=' + length + '&offset=' + \ str(y) + '"' print execShell(cmd)