Hi Colleen,

Thanks for this. I did try to run the searches unfiltered, but no luck. I'm 
still having the same problem. Do you have any other ideas?

Thanks again,
Maggie








On Nov 22, 2013, at 4:18 PM, Colleen Whitney 
<colleen.whit...@marklogic.com<mailto:colleen.whit...@marklogic.com>>
 wrote:

Hi Maggie,

What is likely happening is that your search is running in filtered mode.  
Facet counts are always based on unfiltered estimates, so if that's the case 
there may be a difference in the search result total and the rough estimate in 
the facet.

You can bring the total and the estimate together in a couple of ways, but the 
best (and most performant) is to change your options to run the search as 
unfiltered, and tune your indexing and query strategy so that you get accurate 
searches in that mode.  Basically, it's a matter of making sure that your 
indexes fully support the queries you want to do, so that there's no need for 
the server to fetch results from disk and do the filtering.  There's a good 
description of the underlying issue, and how you might mitigate it, here:  
http://docs.marklogic.com/guide/performance/unfiltered#chapter

If you're using search:search(), the default search mode is filtered.  To run 
searches unfiltered, add to your options:

<search-option>unfiltered</search-option>

--Colleen




________________________________
From: 
general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>
 
[general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>]
 on behalf of Capewell, Margarete 
[margarete.capew...@ptsem.edu<mailto:margarete.capew...@ptsem.edu>]
Sent: Friday, November 22, 2013 12:17 PM
To: general@developer.marklogic.com<mailto:general@developer.marklogic.com>
Subject: [MarkLogic Dev General] Facet Value Count Problem

Hi,

I am working on an XQuery application that is meant to display a list of links 
consisting of author names and how many items in the database are associated 
with that particular author. So, it's a list of facet values with the count 
attributes displayed next to them, for example "Aalders, G. (46 items)". When a 
user clicks on one of these facet values, they are supposed to be presented 
with a paginated list of the results of that author search.

The issue is that when you click on an author name and the paginated list of 
results displays, the count attribute and the number of results changes. So 
taking the earlier example, there should be 46 items displayed for "Aalders, 
G.", but clicking the link shows 51 results. Another example, is "A Christian 
(2 items)". Clicking "A Christian" actually shows 12 results instead of 2.

Does anyone have any idea what the problem could be?

Thanks,
Maggie









_______________________________________________
General mailing list
General@developer.marklogic.com<mailto:General@developer.marklogic.com>
http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to