Hi All

Can I restrict my free text search to a part of the document?

Consider my document is of the following structure. I restrict my search 
to the /test/data. I use search:search API and provide the XPATH in the 
<searchable-expression> option. I am using unfiltered search for better 
performance. Marklogic is returning if the free text is matches within 
metadata tag also.
If I am using filtered search option the marklogic search is limited to 
the data tag only. Please provide some suggestion to limit the search with 
unfiltered search only.

Content

<test>
        <data></data>
        <metadata></metadata>
</test>


Query

let $options := <options xmlns="http://marklogic.com/appservices/search";>
      <searchable-expression>/test/data</searchable-expression>
        <search-option>unfiltered</search-option>
</options>
return
search:search("free text", $options, 1,  10)

Thanks & Regards
Abhishek Srivastav

Assistant Systems Engineer
Tata Consultancy Services
Plot  B-1, Block EP & GP, Sector 5
Salt Lake Electronics Complex,
Kolkata - 700 091,West Bengal
India
Cell:- +91-9883389968
Mailto: [email protected]
Website: http://www.tcs.com
____________________________________________
Experience certainty.   IT Services
                        Business Solutions
                        Outsourcing
____________________________________________
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to