What is the difference between cts: count, cts: frequency, fn: count in MarkLogic?

What is the difference between the cts:count, cts:frequency, fn:countin MarkLogic?

Could you support me with an example?

+4
source share
1 answer

cts:count

Deprecated and intended to accept a sequence of values ​​returned by the vocabulary function (for example, cts:element-values); if you enter non-lexicon values, the result will always be 0.

You should use instead cts:count-aggregate .

The function cts:count-aggregateworks like cts:count, except that it performs the count in parallel at all data nodes and then aggregates the values. It usually works better than cts:count, especially on large clusters.

: https://docs.marklogic.com/cts:count-aggregate

cts:frequency

, , (, cts:element-values). - cts:frequency , . - cts:frequency , .

. https://docs.marklogic.com/cts:frequency

fn:count

. https://docs.marklogic.com/fn:count

.

+4

Source: https://habr.com/ru/post/1624109/


All Articles