Commit 5db98b15 authored by Michael Rose's avatar Michael Rose

reindex: drop nil docs

parent 5ae99073
......@@ -29,6 +29,11 @@ class StoryIndexBase
end
def index(story_id, document, index_name)
if document.nil?
# Empty.
return
end
document.delete('_id')
document = Hashie::Rash.new(document)
document = preprocess(document)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment