marklogic - Count of facet and search differs from search result -


when there character underscore(_) , % in search string, results count , facets count not match search results.

i got 1 search result correct result count , facet count come more that. using search:parse , passing structured cts:query parameter.

what may issue , it's resolution, please suggest.

your search results being filtered, while other values not. when using search api, default behavior filter search results. means first gets candidate result set using indexes, , checks , removes false positives. facets , total result count can calculated using indexes, therefore never filtered.

there couple ways handle this. easiest specify option <search-option>unfiltered</search-option>, , run queries unfiltered. however, means inaccuracies in facet , result counts reflected in search results.

the accurate way configure indexes , queries such correct results can returned using indexes. may take trial , error. generally, want sure use searchable-expression document or fragment root. , in case of symbol characters, consider adding exact option on queries , enabling word position indexes. might enough working in case, however, detailed information on topic, see query performance , tuning guide:

https://docs.marklogic.com/guide/performance/unfiltered


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -