I'm using Marklogic 9.0-8 on windows 10. I have some complex logic that I need to do on marklogic side using xquery. These logics are kind of for validating data inside marklogic.
So I'm thinking to write module functions and store them in marklogic module db/file system, then I want to call from java with some parameters. The parameters are possibly something like search query, like what is collection, like under what directory. After the logic finishes, I need to send the result xml back to java.
I was looking at java search API, hoping that I can plug in the transform library. But I feel that the search API has pagination which won't get all the data that meet the parameters at once, and I don't know how to totally disable pagination. My logic needs to work on all the data that meet the parameters. It seems the java search API is a big bundle, but I'm not sure if it is flexible enough for me to use.
I guess another way is using XCC to just call xquery and get data back.
Does anyone have any suggestions that if there is any better way to do this? or which way I should use?