The searchable expression specifies what the search returns.  It is like the 
first argument to cts:search.  The default is collection(), which searches over 
all of the documents in the database, and returns documents.  Your searchable 
expression returns object elements, and you will get one result for each 
matching object element.  Without the searchable expression, you will get one 
result for each document that has one or more matching object elements.

-Danny

From: [email protected] 
[mailto:[email protected]] On Behalf Of Lisa Liddle
Sent: Tuesday, August 10, 2010 10:47 AM
To: [email protected]
Subject: [MarkLogic Dev General] search:search returning different results

Can anyone tell me why I get different results in these 2 cases?

1.       
<searchable-expression>//obje...@type="chapter"]</searchable-expression>

<additional-query>{cts:and-query((cts:directory-query("/published/", 
"infinity") )) }</additional-query>



2.       Nothing in <searchable-expression>

<additional-query>

{cts:and-query((

    cts:directory-query("/published/", "infinity"),

    cts:element-attribute-value-query(xs:QName("object"), xs:QName("type"), 
"chapter")

 ))}

</additional-query>

I can see why I might get different facet values back, but I also get very 
different results back and I don't understand why.


NOTICE: This email message is for the sole use of the intended recipient(s) and 
may contain confidential and privileged information. Any unauthorized review, 
use, disclosure or distribution is prohibited. If you are not the intended 
recipient, please contact the sender by reply email and destroy all copies of 
the original message.

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

Reply via email to