valueCollector
Collects a list of values from a single document. Value collectors provide values in
query​Builder​Variable
specifications.
The following value​Collector:​* stage types are available for use in analysis request JSONs:
-
value​Collector:​concat -
Concatenates values from another collector into a single value.
-
value​Collector:​direct​String -
Collects constant string values for each document.
-
value​Collector:​direct​Strings -
Collects a constant list of string values for each document.
-
value​Collector:​from​Content​Field -
Collects the value of the document content field you provide.
-
value​Collector:​from​Context -
Collects a query builder variable created by the parent query builder.
-
value​Collector:​from​Document​Neighbors -
Fetches the input document's neighbor documents, invokes the value collector you provide on each neighbor document.
-
value​Collector:​max -
Collects the maximum of values from another collector.
-
value​Collector:​min -
Collects the minimum of values from another collector.
value​Collector:​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.
value​Collector
The value collector to provide the values to concatenate.
value​Collector:​direct​String
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.
value​Collector:​direct​Strings
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.
value​Collector:​from​Content​Field
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.
field​Name
The name of the content field from which to collect the values.
label​Filter
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.
value​Collector:​from​Context
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
query​Builder:​aligned
query builder its child query builders.
variable
The name of the variable whose value to collect.
value​Collector:​from​Document​Neighbors
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
document​Neighborscomponent you provide to fetch the list of neighbor documents. -
From each neighbor document, invoke the
value​Collector, collect all values returned by the collector.
document​Neighbors
Provides the input document's neighbor documents from which to collect values.
value​Collector
The collector to use to collect values from all neighbor documents.
value​Collector:​max
Collects the maximum of values from another collector.
{
"type": "valueCollector:max",
"valueCollector": null
}
value​Collector
The collector providing values from which this component chooses the maximum value. The collector must provide comparable values, such as numbers or strings.
value​Collector:​min
Collects the minimum of values from another collector.
{
"type": "valueCollector:min",
"valueCollector": null
}
value​Collector
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 value​Collector:​*
The following stages and components take value​Collector:​* as
input: