Accessing tokens of an inner field

Hi,

I'm trying to access generated token on a inner field .

Assuming the following mapping :

{
"myMapping" : {
"properties" : {
"simple_field" : {"type" : "string", "store" : "yes"},
"complex_object" : {
"properties" : {
"inner_field" : {"type" : "string", "store" : "yes"}
}
}
}
}
}

curl 'http://localhost:9200/test_index/myMapping/_search?pretty=true' -d '{
"query" : {
"match" : {
"_id" : 24
}
},
"script_fields": {
"terms" : {
"script": "doc[field].values",
"params": {
* "field": "simple_field"*
}
}
}
}'

when asking tokens of field "simple_field", all is going fine. But when I
ask for "complex_object.inner_field", I get the following error :
RuntimeException[unable to invoke method]; nested:
InvocationTargetException; nested: ArrayIndexOutOfBoundsException[10];

Is there any way (excluding analyze API) to get the tokens generated for an
object inner field of a single document ? (I'm using elasticsearch 0.90.0.)

Thanks for helping

Pierre.

--
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 Pierre,
do you have the whole stacktrace of that error? I would be curious to know
more about it.

What you are trying to do is not possible with 0.90 but will be possible in
1.0 storing term_vectors and using the term_vectors api
(Elasticsearch Platform — Find real-time answers at scale | Elastic).

On Wednesday, October 16, 2013 11:54:25 AM UTC+2, Pierre de Soyres wrote:

Hi,

I'm trying to access generated token on a inner field .

Assuming the following mapping :

{
"myMapping" : {
"properties" : {
"simple_field" : {"type" : "string", "store" : "yes"},
"complex_object" : {
"properties" : {
"inner_field" : {"type" : "string", "store" : "yes"}
}
}
}
}
}

curl 'http://localhost:9200/test_index/myMapping/_search?pretty=true' -d
'{
"query" : {
"match" : {
"_id" : 24
}
},
"script_fields": {
"terms" : {
"script": "doc[field].values",
"params": {
* "field": "simple_field"*
}
}
}
}'

when asking tokens of field "simple_field", all is going fine. But when I
ask for "complex_object.inner_field", I get the following error :
RuntimeException[unable to invoke method]; nested:
InvocationTargetException; nested: ArrayIndexOutOfBoundsException[10];

Is there any way (excluding analyze API) to get the tokens generated for
an object inner field of a single document ? (I'm using elasticsearch
0.90.0.)

Thanks for helping

Pierre.

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

Sorry, to clarify what I previously wrote, I'm not aware of any other way
to do what you are trying to do with 0.90, but if you provide the
stacktrace we can look into the problem with inner objects and see what we
can do to fix that.

On Thursday, October 17, 2013 3:31:30 PM UTC+2, Luca Cavanna wrote:

Hi Pierre,
do you have the whole stacktrace of that error? I would be curious to know
more about it.

What you are trying to do is not possible with 0.90 but will be possible
in 1.0 storing term_vectors and using the term_vectors api (
Elasticsearch Platform — Find real-time answers at scale | Elastic
).

On Wednesday, October 16, 2013 11:54:25 AM UTC+2, Pierre de Soyres wrote:

Hi,

I'm trying to access generated token on a inner field .

Assuming the following mapping :

{
"myMapping" : {
"properties" : {
"simple_field" : {"type" : "string", "store" : "yes"},
"complex_object" : {
"properties" : {
"inner_field" : {"type" : "string", "store" : "yes"}
}
}
}
}
}

curl 'http://localhost:9200/test_index/myMapping/_search?pretty=true' -d
'{
"query" : {
"match" : {
"_id" : 24
}
},
"script_fields": {
"terms" : {
"script": "doc[field].values",
"params": {
* "field": "simple_field"*
}
}
}
}'

when asking tokens of field "simple_field", all is going fine. But when I
ask for "complex_object.inner_field", I get the following error :
RuntimeException[unable to invoke method]; nested:
InvocationTargetException; nested: ArrayIndexOutOfBoundsException[10];

Is there any way (excluding analyze API) to get the tokens generated for
an object inner field of a single document ? (I'm using elasticsearch
0.90.0.)

Thanks for helping

Pierre.

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