A User owns one or many subsets of documents (Posts). The idea (UX) is to let the User manage (optionally) the order in which the Posts appears within one subset.
By default, Posts are sorted by CreatedOn. Eventually, the User will drag-and-drop Posts to manage their order. This would allow the User to promote and organize its Posts.
A simple Int32 field Position raises many questions.. Such as:
- Do you allow a position to be negative?
- How do you handle posts with an identical position?
- Do you introduce gaps to reduce collisions?
- Do you update all posts each time a position changes?
- Etc..
.. and finally my point:
What is the best solution for sorting Lucene documents by an user managed position? An Int32 field Position perhaps?
EDIT (valuable information):
- Posts are located in a database and Lucene index.
- Posts are paged.
Look at this question: Reordering an ordered list
Sadly, there’s no perfect solution to this problem 😉