Reputation: 31
I am new to MarkLogic and now I am trying to get some specific result of searching query.
More specifically, searching some word through search API and supposed to get a result of documents which include specific word.
No header information, no rank or any other meta data, just want to get documents as a result.
Is there any way to just one request and get documents as a result? Or do I need to write some code to get specific result.
I'll be appreciated if you help me. Thanks
Upvotes: 0
Views: 80
Reputation: 20414
If you are accessing MarkLogic from outside, I'd have a look at a POST
call to /v1/search
with an Accept
header of multipart/mixed
. Details should be described here: https://docs.marklogic.com/REST/POST/v1/search
If running inside MarkLogic, you could consider using the low-level cts:search, which indeed returns documents directly. Keep in mind though that it won't paginate results, and it is usually unwise to return more than about 50 to 100 documents at once. It would just hog memory, and not allow for parallel processing.
HTH!
Upvotes: 1