Skip to main content

What's New in MarkLogic 11

Changes to jsearch.facets Output Structure

In previous versions of MarkLogic, calling jsearch.facets always produced a JSON object for each facet, with object properties of the form facetValue:count. This structure prevented proper sorting of facet values.

As of MarkLogic 9.0-2, the structure of each facet is an array of arrays instead of a JSON object if and only if you include an explicit orderBy clause in your facet definition. If you do not use orderBy, the output is unchanged.

For more details, see Sorting Facet Values with OrderBy in the Search Developer's Guide.