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:​direct​String
-
Collects constant string values for each document.
-
value​Collector:​direct​Strings
-
Collects 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:​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​Neighbors
component 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:​*
Consumers of
The following stages and components take value​Collector:​*
as
input:
Stage or component | Property |
---|---|
document​Scorer:​by​Values | value​Collector |
value​Collector:​from​Document​Neighbors | value​Collector |