>> return search:search("Book1 facet-on-favorite: 1960s", $options)
>>
>>
>>
>> In this content we have used <year> to form the range constraint and used
>> the same as facet. The problem is when we search for the string “Book1” and
>> the facet as 1960s the whole document is listed in the search response. I
>> just want to get only the part of the document which has “Book1” and year in
>> the range of the 1960 to 1970 as search response, not the whole document.

The result from search:search() is some XML which contains references
to the documents:

<search:response total="323" start="1" page-length="10"
xmlns:search="http://marklogic.com/appservices/search";>
  <search:result index="1" uri="/path/to/doc.xml"
path="doc(&quot;/path/to/doc.xml&quot;)" score="250"
confidence="0.498032" fitness="1">
    <search:snippet>
      <search:match path="doc(&quot;/path/to/doc.xml&quot;)/section/para[8]">
      .....

I'm not sure what you mean by "the whole document is listed in the
search response"...   It sounds like you are after the
search:match/@path.


cheers
-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/
_______________________________________________
General mailing list
General@developer.marklogic.com
http://xqzone.com/mailman/listinfo/general

Reply via email to