The assignment policy passed in is not a range policy.
Correct your code so that you only pass in a range assignment policy to this function.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.