Skip to content

Commit

Permalink
Fixed ack
Browse files Browse the repository at this point in the history
  • Loading branch information
romanchyla committed Nov 15, 2017
1 parent 65b9811 commit 4fd0a32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions adsmp/solr_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ def extract_data_pipeline(data, solrdoc):

def extract_fulltext(data, solrdoc):
out = {}
for x in ('body', 'acknowledgements', 'dataset'):
for x,f in (('body', 'body'), ('acknowledgements', 'ack')):
if x in data:
out[x] = data[x]
out[f] = data[x]
return out


Expand Down
4 changes: 2 additions & 2 deletions adsmp/tests/test_solr_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def test_solr_transformer(self):

rec = self.app.get_record('bibcode')
self.assertDictContainsSubset({u'abstract': u'abstract text',
u'acknowledgements': u'aaa',
u'ack': u'aaa',
u'aff': [u'-', u'-', u'-', u'-'],
u'alternate_bibcode': [u'2003adass..12..283B'],
u'author': [u'Blecksmith, E.', u'Paltani, S.', u'Rots, A.', u'Winkelman, S.'],
Expand Down Expand Up @@ -206,7 +206,7 @@ def test_solr_transformer(self):
'citation_count': 6,
'cite_read_boost': 0.1899999976158142,
u'database': [u'astronomy'],
u'dataset': ['a', 'b', 'c'],
#u'dataset': ['a', 'b', 'c'],
u'date': u'2003-01-01T00:00:00.000000Z',
u'doctype': u'inproceedings',
u'doctype_facet_hier': [u'0/Article', u'1/Article/Proceedings Article'],
Expand Down

0 comments on commit 4fd0a32

Please sign in to comment.