In General - estimate can be as wide ranging as completely accurate to absolutely wrong, as your seeing. ( it will be wrong on the high end). Roughly speaking, estimate is returning the count of documents which can be determined solely by the indexes.
See : http://docs.marklogic.com/xdmp:estimate I can be non obvious to know when estimate is going to be close , exact or totally wrong See this link for a better description. http://docs.marklogic.com/guide/search-dev/count_estimate#chapter The link above references good material on how to determine the when estimate will be accurate and how to choose appropriate use and design. ----------------------------------------------------------------------------- David Lee Lead Engineer MarkLogic Corporation [email protected] Phone: +1 812-482-5224 Cell: +1 812-630-7622 www.marklogic.com<http://www.marklogic.com/> From: [email protected] [mailto:[email protected]] On Behalf Of Mrinmoy Khamrui Sent: Monday, October 27, 2014 5:25 AM To: MarkLogic Developer Discussion Subject: [MarkLogic Dev General] Problem with wildcarded (?) search in element-word-query Dear All, I am having problem with wildcarded search in cts:element-word-query when used with ? as wildcard. let $estimate := xdmp:estimate( cts:search(/product, cts:element-word-query(fn:QName("", "title"), "Studying?", ("case-insensitive","diacritic-insensitive","punctuation-insensitive","stemmed","wildcarded","lang=en"), 1) ) ) let $count := count( cts:search(/product, cts:element-word-query(fn:QName("", "title"), "Studying?", ("case-insensitive","diacritic-insensitive","punctuation-insensitive","stemmed","wildcarded","lang=en"), 1) ) ) return text{$estimate, $count} Here I get estimate as number of all documents in DB whereas count is zero. Can someone help me to understand and provide a way to address this? Thanks Mrinmoy
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
