rwynn / monstache

a go daemon that syncs MongoDB to Elasticsearch in realtime. you know, for search.

Home Page:https://rwynn.github.io/monstache-site/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

decending sorting

eirik-andersen opened this issue · comments

thanks for the greate software to sync mongodb to elastic.

when using the findOne method in the transformation to do a lookup in the database, is it possible to have it select the last record and not the first?

If you have any field that you can use to determine the first record or the last record, something like timestamp maybe createdAt, _updatedAt etc. or based on your criteria for sorting, it should be easy to achieve what you want.

Are you using js or go plugin?