سؤال

If I create an atom increment to use as an index, eg "post::1", "post::2" etc, it will sort fine up until it reaches the next key length because of the unicode collation.

Is there a better practice for indexing for later searching with views?

هل كانت مفيدة؟

المحلول

Use padding?

key = sprintf("post::%08d", counter)
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top