Your search is 'filtered' While the counts for search are generated with
xdmp:estimate - which is essentially against the unfiltered fragments.

As odd as the results seem, I think it is the expected result in this case.





Kind Regards,
David Ennis


David Ennis
*Content Engineer*

[image: HintTech]  <http://www.hinttech.com/>
Mastering the value of content
creative | technology | content

Delftechpark 37i
2628 XJ Delft
The Netherlands
T: +31 88 268 25 00
M: +31 63 091 72 80

[image: http://www.hinttech.com] <http://www.hinttech.com>
<https://twitter.com/HintTech>  <http://www.facebook.com/HintTech>
<http://www.linkedin.com/company/HintTech>

On 21 September 2015 at 17:26, Roy Chowdhury, Soumadri <
[email protected]> wrote:

> Hi,
>
>
> I am using marklogic faceting for search using search:search function. I
> am having issues with facet count mismatch with the search result where the
> search query is wildcarded. Following is the search options and constraint
> configuration sample I am using in my code,
>
>
> *Search options:*
>
> <options xmlns="http://marklogic.com/appservices/search";>
> <return-results>true</return-results>
> <search-option>filtered</search-option>
> <grammar>
>     <quotation>"</quotation>
>     <implicit>
>         <cts:and-query xmlns:cts="http://marklogic.com/cts"; strength="20"/>
>     </implicit>
>     <starter strength="30" apply="grouping" delimiter=")">(</starter>
>     <starter strength="40" apply="prefix" element="cts:not-query">-</starter>
>     <joiner strength="10" apply="infix" element="cts:or-query" 
> tokenize="word">OR</joiner>
>     <joiner strength="10" apply="infix" element="cts:or-query" 
> tokenize="word">or</joiner>
>     <joiner strength="20" apply="infix" element="cts:and-query" 
> tokenize="word">AND</joiner>
>     <joiner strength="20" apply="infix" element="cts:and-query" 
> tokenize="word">and</joiner>
>     <joiner strength="50" apply="constraint">=</joiner>
>     <joiner strength="50" apply="constraint" compare="LT" 
> tokenize="word">&lt;</joiner>
>     <joiner strength="50" apply="constraint" compare="LE" 
> tokenize="word">&lt;=</joiner>
>     <joiner strength="50" apply="constraint" compare="GT" 
> tokenize="word">&gt;</joiner>
>     <joiner strength="50" apply="constraint" compare="GE" 
> tokenize="word">&gt;=</joiner>
>     <joiner strength="50" apply="constraint" compare="NE" 
> tokenize="word">!=</joiner>
> </grammar>
>
> <constraint name="Name">
>  <word>
>  <element ns="" name="Name"/>
>  <term-option>case-insensitive</term-option>
>  <term-option>diacritic-sensitive</term-option>
>  <term-option>punctuation-sensitive</term-option>
>  <term-option>whitespace-sensitive</term-option>
>  <term-option>unstemmed</term-option>
>  <term-option>wildcarded</term-option>
>  </word>
> </constraint>
>
> <constraint name="Category">
>  <range type="xs:string" facet="true">
>  <element ns="" name="Category"/>
>  <facet-option>frequency-order</facet-option>
>  <facet-option>descending</facet-option>
>  </range>
> </constraint>
>
> </options>
>
> When the search query includes a wildcarded query (e.g. Name=in*), the sum of 
> the facets count is turning out to be more than the number of results 
> returned. The facet element (i.e. Category) and searched element (i.e. Name) 
> are present in the same document.
>
> Regards,
>
> Soumadri Roy
>
> "This e-mail and any attachments transmitted with it are for the sole use
> of the intended recipient(s) and may contain confidential , proprietary or
> privileged information. If you are not the intended recipient, please
> contact the sender by reply e-mail and destroy all copies of the original
> message. Any unauthorized review, use, disclosure, dissemination,
> forwarding, printing or copying of this e-mail or any action taken in
> reliance on this e-mail is strictly prohibited and may be unlawful."
>
> _______________________________________________
> General mailing list
> [email protected]
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
>
>
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to