rastro
(rastro)
November 6, 2013, 8:33pm
1
I can now create a script field:
"script_fields" : {
"elapsed_tmp": {
"script": "singletimer",
"type": "float",
"lang": "js"
}
}
This sets elapsed_tmp to a value like 1.234.
I really need the min/max/mean of these values across the query, so I'd
like to use the statistical facet:
"facets" : {
"stats0": {
"statistical": {
"field": "elapsed_tmp"
}
}
}
It complained that there was no mapping for elapsed_tmp, so I added one.
Now, it generates no errors, but returns no results:
"facets" : {
"stats0" : {
"_type" : "statistical",
"count" : 0,
"total" : 0.0,
"min" : "Infinity",
"max" : "-Infinity",
"mean" : 0.0,
"sum_of_squares" : 0.0,
"variance" : "NaN",
"std_deviation" : "NaN"
}
}
Anybody know how to make this work? Generically, the problem I'm trying to
solve is to pull a piece of data out of message with a regex, and then run
stats on that.
Thanks!
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
spinscale
(Alexander Reelsen)
November 14, 2013, 10:10am
2
Hey,
the statistical facet itself includes support for scripts fields, you
should go with that. See
Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.
--Alex
On Wed, Nov 6, 2013 at 9:33 PM, rastro robert@webmstr.com wrote:
I can now create a script field:
"script_fields" : {
"elapsed_tmp": {
"script": "singletimer",
"type": "float",
"lang": "js"
}
}
This sets elapsed_tmp to a value like 1.234.
I really need the min/max/mean of these values across the query, so I'd
like to use the statistical facet:
"facets" : {
"stats0": {
"statistical": {
"field": "elapsed_tmp"
}
}
}
It complained that there was no mapping for elapsed_tmp, so I added one.
Now, it generates no errors, but returns no results:
"facets" : {
"stats0" : {
"_type" : "statistical",
"count" : 0,
"total" : 0.0,
"min" : "Infinity",
"max" : "-Infinity",
"mean" : 0.0,
"sum_of_squares" : 0.0,
"variance" : "NaN",
"std_deviation" : "NaN"
}
}
Anybody know how to make this work? Generically, the problem I'm trying
to solve is to pull a piece of data out of message with a regex, and then
run stats on that.
Thanks!
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .