Hi David,
Use additional-query element in your option
example:
<search:options xmlns="http://marklogic.com/appservices/search">
<default-suggestion-source>
<range collation="http://marklogic.com/collation/"
type="xs:string" facet="true">
<element ns="" name="name"/>
</range>
</default-suggestion-source>
<search:additional-query>{(cts:collection-query("collection1")}</search:additional-query>
</search:options>
Regards,
Asit Nautiyal
From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Steiner, David J. (LNG-DAY) [david.j.stei...@elsevier.com]
Sent: Wednesday, May 27, 2015 6:05 PM To: MarkLogic Developer Discussion Subject: [MarkLogic Dev General] using collection and range in default-suggestion-source I’d like to restrict my suggestions based upon collections (1 to N) for a given range element. I’ve tried adding <collection> element(s) to the options but once I add it, I get no results back.
This works: <search:options xmlns="http://marklogic.com/appservices/search"> <default-suggestion-source> <range collation="http://marklogic.com/collation/" type="xs:string" facet="true"> <element ns="" name="name"/> </range> </default-suggestion-source> </search:options>
This does not: <search:options xmlns="http://marklogic.com/appservices/search"> <default-suggestion-source> <range collation="http://marklogic.com/collation/" type="xs:string" facet="true"> <element ns="" name="name"/> </range> <collection>collection1</collection> </default-suggestion-source> </search:options>
The documentation says, “The default-suggestion-source element can have zero or more of the following child elements: <collection> … <range> … <word> … <word> …”
So, is it not possible to combine ranges and collections, or am I just not doing it correctly?
Thanks,
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. ---------------------------------------------------------------------------------------------------------------------------------------------------- |
_______________________________________________ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general