Auto increment GUIDs are the best, but with timestamps, as you suggested,
there might be severa within the same resolution. One way to work around
them is the create the query with where you subtract the resolution you get
on your machine (1 milli for example), use "index" on whatever falls within
it, and use create on the rest (assuming you know that they don't exists in
By the way, the most difficult part when it comes to sync's is to handle
deletes, I assume you don't have them?
On Wed, Aug 4, 2010 at 4:59 PM, John Merrells firstname.lastname@example.org wrote:
On Aug 4, 2010, at 6:49 AM, Shay Banon wrote:
Why float? I assumed long and represent it as a timestamp. Date type in
elasticsearch is just a facade on top of long.
There could be many updates in a second... In Ruby Time.now.to_f returns a
I've just realized that mongo can auto generate ids, which are a bit like
guids, so have a
seconds and a counter field within them.... soo... I could extract those
bits and use them,
but it'd amount to much the same thing, and be a bit opaque.
Still pre coffee.... still rambling....