save sorting order in index; better APIs

When the partial index is created with one sorting order, we should not insert
other sequences in a different order; otherwise unexpected behavior may happen.
To reduce the risk of misusing the APIs, users are asked to set the sorting
order when initializing the index.