db4b9f4d50af9e83733fc301c32e85cbe6d9c812,conceptnet5/builders/json_to_solr.py,,convert_to_solr,#Any#Any#,12

Before Change


    for line in in_stream:
        if not line.strip():
            continue
        info = json.loads(line.strip().decode("utf-8"))
        writer.write(info)
    writer.close()

After Change


        if "surfaceText" in info and info["surfaceText"] is None:
            del info["surfaceText"]

        solr_struct = {"doc": info, "boost": boost}
        solr_fragment = "\t"add": %s," % json.dumps(solr_struct)
        print(solr_fragment, file=out)
    print("\t"commit": {}", file=out)
    print("}", file=out)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: commonsense/conceptnet5
Commit Name: db4b9f4d50af9e83733fc301c32e85cbe6d9c812
Time: 2014-02-25
Author: rob@luminoso.com
File Name: conceptnet5/builders/json_to_solr.py
Class Name:
Method Name: convert_to_solr


Project Name: chakki-works/doccano
Commit Name: 49d41416e440926f0a9a8243b4d77f6f5468efe9
Time: 2019-03-12
Author: light.tree.1.13@gmail.com
File Name: app/server/utils.py
Class Name: CoNLLHandler
Method Name: parse


Project Name: cve-search/cve-search
Commit Name: 0c11680229ec321925d9b244a72ea5e06a7c7a6f
Time: 2013-03-30
Author: a@foo.be
File Name: search_fulltext.py
Class Name:
Method Name: