The way I can think of to do this is to use <return-constraints>true</return-constraints>, which will give you a list of all of the constraints. Then you can take all of the range constraints that are faceted and have some logic that looks through each faceted named constraint and, if there is no search:facet with that name, then make an entry with no content for that named constraint. My guess is it would take 10 or 20 lines of code to do that.
-Danny From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Thursday, July 18, 2013 3:04 PM To: [email protected] Subject: [MarkLogic Dev General] Return 0 Count Facet Rows I am using the search API to populate some data. I had the notion to use the facet results to drive the UI controls on the screen. Our business wants the controls to remain even if there are no results for a given facet item. However, when I start drilling down results, obviously there are 0 results for some of the items. Marklogic does not include those in the search response, which makes sense most of the time. However, I would like them to show up. How can I get it to pass back entries in the index that have a count of 0? Thanks
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
