Reputation: 13
I want to do the following for documents registered in the MarkLogic database.
If you want to get a snippet as a search result, I'd like to use Search API search: search or search: resolve functions. However, unlike the cts: search function, these functions can not specify a node as an argument, so it seems that you can not search only for a specific node (document).
cts:search:
cts:search(
$expression as node()*,
$query as cts:query?,
[$options as (cts:order|xs:string)*],
[$quality-weight as xs:double?],
[$forest-ids as xs:unsignedLong*]
) as node()*
search:resolve:
search:resolve(
$query as element(),
[$options as element(search:options)?],
[$start as xs:unsignedLong?],
[$page-length as xs:unsignedLong?]
) as element(search:response)
Please let me know if you are searching only for specific documents (nodes) and knowing how to obtain search results as snippets.
Upvotes: 1
Views: 193
Reputation: 20414
I think you are looking for <searchable-expression>
that you can put in the <search:options>
. See also:
HTH!
Upvotes: 2