Hi,

I am using the Search API, AKA search:search().  I need to restrict the set
of elements to use for a search string with no specific constraint (e.g.
"this AND that" as opposed to "this:that").

As a simplification, let's say I need to restrict the search to two
elements, namely "foo" and "bar", in no namespace, with different weights.
I would have used the following, but "default" seems to accept only one
"word":

search:search(
   'this AND that',
   <options xmlns="http://marklogic.com/appservices/search";>
      <term>
         <default>
            <word>
               <element name="foo" ns=""/>
               <weight>10.0</weight>
            </word>
            <word>
               <element name="bar" ns=""/>
               <weight>5.0</weight>
            </word>
         </default>
      </term>
   </options>)

MarkLogic does not complain on this one, but only takes the first one into
account (well, at least the results returned are as if it was).

I feel I am missing something obvious here.  How is it possible to restrict
a full text search to a set of element names using search:search()?

Regards;

-- 
Florent Georges
H2O Consulting
http://h2o.consulting/
_______________________________________________
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to