6140cbd632d9e5c835cb6feaf3f7f7420facbe47,datastore/elastic_search/query.py,,get_dictionary_records,#Any#Any#Any#Any#Any#,88
Before Change
results_dictionary = {}
results = search_results["hits"]["hits"]
for result in results:
results_dictionary.setdefault(result["_source"]["value"], {})
results_dictionary[result["_source"]["value"]][result["_source"]["language_script"]] = {
"_id": result["_id"],
"value": result["_source"]["variants"]
}
After Change
query_list.append(data)
results = []
for query in query_list:
search_kwargs = dict(kwargs, body=query, doc_type=doc_type,
size=ELASTICSEARCH_SEARCH_SIZE, index=index_name, scroll="1m")
search_results = _run_es_search(connection, **search_kwargs)
// Parse hits
if search_results:
results.extend(search_results["hits"]["hits"])
return results
def delete_dictionary_records_by_word(connection, index_name, doc_type, entity_name, word_list=None, **kwargs):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: hellohaptik/chatbot_ner
Commit Name: 6140cbd632d9e5c835cb6feaf3f7f7420facbe47
Time: 2019-01-13
Author: jatin.parekh@haptik.co
File Name: datastore/elastic_search/query.py
Class Name:
Method Name: get_dictionary_records
Project Name: explosion/thinc
Commit Name: b3f15c5b509746c04ca7ed7a8825dcfca60ffe1c
Time: 2017-01-18
Author: honnibal@gmail.com
File Name: thinc/neural/_classes/embed.py
Class Name: Embed
Method Name: _embed
Project Name: explosion/thinc
Commit Name: 3140a57326e533548df00f0f128cd356932d400b
Time: 2017-01-11
Author: honnibal+gh@gmail.com
File Name: thinc/neural/_classes/model.py
Class Name: Model
Method Name: __init__