If a user has elasticsearch 2 or higher and has search.elastic.version set
to 2 or higher they will use the new lastModified (date) field instead of
the deprecated _timestamp which is kept for backword compatibility with
This fixes indexing so search can pick the results up.
@EBernhardson helped me a lot with the fix, he told me what things to do, I just applied it and uploaded the patch.