xdmp.position( test as String?, target as String?, [collation as String?] ) as Number?
Returns an integer value representing the starting position of a string within the search string. Note, the string starting position is 1. If the first parameter is empty, the result is the empty sequence.
xdmp.position("chin","searchintext"); => 5
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.