Skip to content

Commit

Permalink
Don't commit to solr initially
Browse files Browse the repository at this point in the history
  • Loading branch information
alastair committed Jun 22, 2011
1 parent 4b49e0f commit bd7a779
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion util/fastingest.py
Expand Up @@ -16,6 +16,8 @@ def parse_json_dump(jfile):
bigeval = {}
fullcodes = []
for c in codes:
if "code" not in c:
continue
code = c["code"]
m = c["metadata"]
if "track_id" in m:
Expand Down Expand Up @@ -58,7 +60,7 @@ def parse_json_dump(jfile):
for (i, f) in enumerate(sys.argv[pos:]):
print "%d/%d %s" % (i+1, len(sys.argv)-pos, f)
codes, bigeval = parse_json_dump(f)
fp.ingest(codes)
fp.ingest(codes, do_commit=False)
if write_bigeval:
bename = "bigeval.json"
if not os.path.exists(bename):
Expand All @@ -67,3 +69,4 @@ def parse_json_dump(jfile):
be = json.load(open(bename))
be.update(bigeval)
json.dump(be, open(bename, "w"))
fp.commit()

0 comments on commit bd7a779

Please sign in to comment.