countDocuments - AFS

AFS Integration Guide

Product
AFS
AFS_Version
7.7
Category
Reference Guide

Role

When counting documents containing sets, countDocuments allows choosing whether the facets count documents or set instances.

Status

Optional. Default value is true. Use true to count documents and false to count set instances.

Type

Boolean

Example

A result set contains two documents D1 and D2.

D1 has a set with three items d11, d12, d13 and D2 has a set with a single item, d21.

The value of the output flow will be:

  • 2 if afs:countDocuments is true (D1 and D2)
  • 4 if afs:countDocuments is false (d11, d12, d13 and d21)

Example: afs:facetDefault=countDocument=true