Nested field with script_field in a terms facet

Hi everyone.

I stumbled upon an error and I am wondering if that's normal.
I try to run a terms facet with a script_field that looks like this :
"_source.myField".
When myField isn't nested, all's well. I get my results.
But when it is nested, i'm getting a error saying I can't access to that
field. Setting the nested property on the facet doesn't change anything in
that regard.

So, is it possible to use a nested field in such a script?
Thanks for any info !
DH

--
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.

On Thu, 2013-01-31 at 01:55 -0800, DH wrote:

Hi everyone.

I stumbled upon an error and I am wondering if that's normal.
I try to run a terms facet with a script_field that looks like this :
"_source.myField".
When myField isn't nested, all's well. I get my results.
But when it is nested, i'm getting a error saying I can't access to
that field. Setting the nested property on the facet doesn't change
anything in that regard.

So, is it possible to use a nested field in such a script?

It works for me. I suggest gisting a curl recreation of the problem, so
that we can see exactly what it is you are doing.

clint

--
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.

Hey Clinton,

Please have a look at the example curl found here:

https://groups.google.com/d/msg/elasticsearch/vrrtTam-Asc/Ioke1PWlSKEJ

I too am experiencing the same thing. Any ideas what we might be doing
wrong that you seem to be doing differently?

Thanks!

On Thursday, 31 January 2013 05:33:24 UTC-5, Clinton Gormley wrote:

On Thu, 2013-01-31 at 01:55 -0800, DH wrote:

Hi everyone.

I stumbled upon an error and I am wondering if that's normal.
I try to run a terms facet with a script_field that looks like this :
"_source.myField".
When myField isn't nested, all's well. I get my results.
But when it is nested, i'm getting a error saying I can't access to
that field. Setting the nested property on the facet doesn't change
anything in that regard.

So, is it possible to use a nested field in such a script?

It works for me. I suggest gisting a curl recreation of the problem, so
that we can see exactly what it is you are doing.

clint

--
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.

Hi Bob,

The _source is stored with the main (root) document and isn't accessible
from a nested inner object (it is decoupled from the main Lucene document
that has the _source). What you can do is store the chapter. paragraph.keywords field via the mapping (store=true) and access it via
the _fields['chapter.paragraph.keywords'] notation in the script.

On 20 August 2013 02:58, btiernay rtiernay@gmail.com wrote:

Hey Clinton,

Please have a look at the example curl found here:

https://groups.google.com/d/msg/elasticsearch/vrrtTam-Asc/Ioke1PWlSKEJ

I too am experiencing the same thing. Any ideas what we might be doing
wrong that you seem to be doing differently?

Thanks!

On Thursday, 31 January 2013 05:33:24 UTC-5, Clinton Gormley wrote:

On Thu, 2013-01-31 at 01:55 -0800, DH wrote:

Hi everyone.

I stumbled upon an error and I am wondering if that's normal.
I try to run a terms facet with a script_field that looks like this :
"_source.myField".
When myField isn't nested, all's well. I get my results.
But when it is nested, i'm getting a error saying I can't access to
that field. Setting the nested property on the facet doesn't change
anything in that regard.

So, is it possible to use a nested field in such a script?

It works for me. I suggest gisting a curl recreation of the problem, so
that we can see exactly what it is you are doing.

clint

--
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.

--
Met vriendelijke groet,

Martijn van Groningen

--
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.