valueCollector
Collects a list of values from a single document. Value collectors provide values in
queryBuilderVariable
specifications.
The following valueCollector:* stage types are available for use in analysis request JSONs:
-
valueCollector:concat -
Concatenates values from another collector into a single value.
-
valueCollector:directString -
Collects constant string values for each document.
-
valueCollector:directStrings -
Collects a constant list of string values for each document.
-
valueCollector:fromContentField -
Collects the value of the document content field you provide.
-
valueCollector:fromContext -
Collects a query builder variable created by the parent query builder.
-
valueCollector:fromDocumentNeighbors -
Fetches the input document's neighbor documents, invokes the value collector you provide on each neighbor document.
-
valueCollector:max -
Collects the maximum of values from another collector.
-
valueCollector:min -
Collects the minimum of values from another collector.
valueCollector:concat
Concatenates values from another collector into a single value.
{
"type": "valueCollector:concat",
"delimiter": " ",
"valueCollector": null
}delimiter
The delimiter to use to join the values.
valueCollector
The value collector to provide the values to concatenate.
valueCollector:directString
Collects constant string values for each document.
{
"type": "valueCollector:directString",
"value": null
}value
The value to collect.
You can use request variables to customize the value.
valueCollector:directStrings
Collects constant list of string values for each document.
{
"type": "valueCollector:directStrings",
"values": null
}values
The list of values to collect.
You can use request variables to customize the value.
valueCollector:fromContentField
Collects the value of the document content field you provide.
{
"type": "valueCollector:fromContentField",
"fieldName": null,
"labelFilter": {
"type": "labelFilter:acceptAll"
}
}From each input document, collects all the values of the document's content field you configure.
fieldName
The name of the content field from which to collect the values.
labelFilter
The label filter that determines which field values to collect.
This collector collects only the field values accepted by the filter you provide in this property.
valueCollector:fromContext
Collects a query builder variable created by the parent query builder.
{
"type": "valueCollector:fromContext",
"variable": null
}
This collector is useful for retrieving query builder variables passed by the
queryBuilder:aligned
query builder its child query builders.
variable
The name of the variable whose value to collect.
valueCollector:fromDocumentNeighbors
Fetches the input document's neighbor documents, invokes the value collector you provide on each neighbor document.
{
"type": "valueCollector:fromDocumentNeighbors",
"documentNeighbors": {
"type": "documentNeighbors:reference",
"auto": true
},
"valueCollector": null
}For each input document this collector performs the following actions:
-
Invoke the
documentNeighborscomponent you provide to fetch the list of neighbor documents. -
From each neighbor document, invoke the
valueCollector, collect all values returned by the collector.
documentNeighbors
Provides the input document's neighbor documents from which to collect values.
valueCollector
The collector to use to collect values from all neighbor documents.
valueCollector:max
Collects the maximum of values from another collector.
{
"type": "valueCollector:max",
"valueCollector": null
}valueCollector
The collector providing values from which this component chooses the maximum value. The collector must provide comparable values, such as numbers or strings.
valueCollector:min
Collects the minimum of values from another collector.
{
"type": "valueCollector:min",
"valueCollector": null
}valueCollector
The collector providing values from which this component chooses the minium value. The collector must provide comparable values, such as numbers or strings.
Consumers of valueCollector:*
The following stages and components take valueCollector:* as
input: