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()

if __name__ == "__main__":

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: OpenMined/Grid
Commit Name: 2708ccddd59bc7be358dc8ae8297dce26f545741
Time: 2019-10-04
Author: ionesiojr@gmail.com
File Name: grid/websocket_client.py
Class Name: WebsocketGridClient
Method Name: models


Project Name: OpenMined/Grid
Commit Name: 2708ccddd59bc7be358dc8ae8297dce26f545741
Time: 2019-10-04
Author: ionesiojr@gmail.com
File Name: grid/websocket_client.py
Class Name: WebsocketGridClient
Method Name: delete_model