Suggestions based on the range element found only in the specified 
collection(s).

From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Asitmohan Nautiyal
Sent: Wednesday, May 27, 2015 10:45 AM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] using collection and range in 
default-suggestion-source

Hi David,

Do you want to get suggestions based on default-suggestion-source(<element 
ns="" name="name"/>) with include collection or exclude collection???


Regards,
Asit Nautiyal
________________________________
From: 
general-boun...@developer.marklogic.com<mailto: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 7:46 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] using collection and range in 
default-suggestion-source
Hi Asit,

This doesn't work.  I get the same result whether I specify collections that I 
want or collections that I don't want - as long as it is a valid collection or 
collections, I get the same result.

Thanks,
David


From: 
general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>
 [mailto:general-boun...@developer.marklogic.com] On Behalf Of Asitmohan 
Nautiyal
Sent: Wednesday, May 27, 2015 9:20 AM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] using collection and range in 
default-suggestion-source

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<mailto: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,
David


::DISCLAIMER::
----------------------------------------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only.
E-mail transmission is not guaranteed to be secure or error-free as information 
could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or may contain viruses in 
transmission. The e mail and its contents
(with or without referred errors) shall therefore not attach any liability on 
the originator or HCL or its affiliates.
Views or opinions, if any, presented in this email are solely those of the 
author and may not necessarily reflect the
views or opinions of HCL or its affiliates. Any form of reproduction, 
dissemination, copying, disclosure, modification,
distribution and / or publication of this message without the prior written 
consent of authorized representative of
HCL is strictly prohibited. If you have received this email in error please 
delete it and notify the sender immediately.
Before opening any email and/or attachments, please check them for viruses and 
other defects.
----------------------------------------------------------------------------------------------------------------------------------------------------
_______________________________________________
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to