jorisroling / meteor-isotope

Do What The F*ck You Want To Public License
0 stars 2 forks source link

Sorting does not apply to changed documents #9

Open nadeemja opened 7 years ago

nadeemja commented 7 years ago

Hi,

If I use {sort: {numberOfLikes: -1}} in my query, then Isotope does not respect this for updated documents.

If Document A has 2 likes, and Document B has 1, then B should be moved before A after getting 2 likes. This does not happen.

@jorisroling Do you have time to look?

To replicate, simply set {sort: {fieldThatWillChange: -1}} in a cursor, add atleast two documents, and increment fieldThatWillChange for whatever document that is last.