"CC by-sa" : "CC BY-SA", "CC by-nd" : "CC BY-ND", "not-cc-like" : "Not CC-like" } query = \ { "query" : { "query_string" : { "default_field" : "index.issn.exact", "query" : "0028-9930" } } } # Connection to the ES index conn = raw.make_connection(None, 'localhost', 9200, 'doaj') # Edit the Journals write_batch = [] batch_size = 1000 for article_issn in missed_articles: query['query']['query_string']['query'] = article_issn for a in tasks.scroll(conn, 'article', query): try: article_model = models.Article(_source=a) a_license = article_model.data.get('index')['license'] # Change the license article_model.data.get('index')['license'] = [license_correct_dict[a_license[0]]]
"CC by-sa": "CC BY-SA", "CC by-nd": "CC BY-ND", "not-cc-like": "Not CC-like" } query = \ { "query" : { "query_string" : { "default_field" : "index.issn.exact", "query" : "0028-9930" } } } # Connection to the ES index conn = raw.make_connection(None, 'localhost', 9200, 'doaj') # Edit the Journals write_batch = [] batch_size = 1000 for article_issn in missed_articles: query['query']['query_string']['query'] = article_issn for a in tasks.scroll(conn, 'article', query): try: article_model = models.Article(_source=a) a_license = article_model.data.get('index')['license'] # Change the license article_model.data.get('index')['license'] = [