Skip to content

Commit

Permalink
Add 'date' field to creative work search (#231)
Browse files Browse the repository at this point in the history
* Fix elasticsearch bot

* Add general-purpose `date` field to search
  • Loading branch information
aaxelb authored and chrisseto committed Jul 10, 2016
1 parent 3a551e8 commit 735e651
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bots/elasticsearch/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ def serialize_creative_work(self, creative_work):
'contributors': [self.serialize_person(person) for person in creative_work.contributors.all()],
'date_created': creative_work.date_created.isoformat(),
'date_modified': creative_work.date_modified.isoformat(),
'date': (creative_work.date_published or creative_work.date_updated or creative_work.date_created).isoformat(),
'description': creative_work.description,
'language': creative_work.language,
'links': [str(link) for link in creative_work.links.all()],
Expand Down

0 comments on commit 735e651

Please sign in to comment.