ElasticSearch - Shape found but missing field - pre-indexed shape

I am trying to filter Objects in ElasticSearch with the geo_shape filter,
this is my mapping for the fields:

geo: {
6: {
properties: {
admin_level_text: {
type: "string",
include_in_all: false
},
location: {
type: "geo_shape",
}
}}}

but when I execute the query, I get an ElasticSearchIllegalStateException.
But when I dump the data, the field is in the data.

Parse Failure [Failed to parse source [{ "query" :{ "filtered" :{ "query" :{ "match_all" :{ } },"filter" :{ "geo_shape" :{ "adresse.location" :{ "indexed_shape" :{ "id": "kiel", "type": "6", "index": "geo", "shape_field_name": "location" } } } } } } }]]]; nested: ElasticSearchIllegalStateException[Shape with name [kiel] found but missing location field]; }]

Any ideas?

--
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 Christian,

have you tried to change the fieldname "adresse.location" to "location"? If
so could please provide an example of the data youre indexing? Which
version of ES are you using?

--Florian

On Thursday, June 20, 2013 10:17:30 AM UTC+2, Christian Hansen wrote:

I am trying to filter Objects in Elasticsearch with the geo_shape filter,
this is my mapping for the fields:

geo: {
6: {
properties: {
admin_level_text: {
type: "string",
include_in_all: false
},
location: {
type: "geo_shape",
}
}}}

but when I execute the query, I get an ElasticSearchIllegalStateException.
But when I dump the data, the field is in the data.

Parse Failure [Failed to parse source [{ "query" :{ "filtered" :{ "query" :{ "match_all" :{ } },"filter" :{ "geo_shape" :{ "adresse.location" :{ "indexed_shape" :{ "id": "kiel", "type": "6", "index": "geo", "shape_field_name": "location" } } } } } } }]]]; nested: ElasticSearchIllegalStateException[Shape with name [kiel] found but missing location field]; }]

Any ideas?

--
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 Florian,

I am using es 0.90.1. I wrote the same shape in location AS in
adresse.location as you mentioned, same problem.

If I change the "shape_field_name" parameter to test the errors changes:

ElasticSearchIllegalStateException[Shape with name [kiel] found but missing test field];

Maybe the problem ist within my pre-indexed shape. but elastic throws no
errors when indexing my polygon as geo_shape.

Here is a gist of the pre-indexed shape-data:

And here one of the complete mapping:

thanks for your help :slight_smile:

Am Freitag, 21. Juni 2013 10:20:58 UTC+2 schrieb Florian Schilling:

Hi Christian,

have you tried to change the fieldname "adresse.location" to "location"?
If so could please provide an example of the data youre indexing? Which
version of ES are you using?

--Florian

On Thursday, June 20, 2013 10:17:30 AM UTC+2, Christian Hansen wrote:

I am trying to filter Objects in Elasticsearch with the geo_shape filter,
this is my mapping for the fields:

geo: {
6: {
properties: {
admin_level_text: {
type: "string",
include_in_all: false
},
location: {
type: "geo_shape",
}
}}}

but when I execute the query, I get an
ElasticSearchIllegalStateException. But when I dump the data, the field is
in the data.

Parse Failure [Failed to parse source [{ "query" :{ "filtered" :{ "query" :{ "match_all" :{ } },"filter" :{ "geo_shape" :{ "adresse.location" :{ "indexed_shape" :{ "id": "kiel", "type": "6", "index": "geo", "shape_field_name": "location" } } } } } } }]]]; nested: ElasticSearchIllegalStateException[Shape with name [kiel] found but missing location field]; }]

Any ideas?

--
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 Christian,

I'm working on your issue. So far I reconized, if the location field is the
first field in your data it works but I need to look a little deeper into
the things.

--Florian

On Friday, June 21, 2013 12:36:36 PM UTC+2, Christian Hansen wrote:

Hi Florian,

I am using es 0.90.1. I wrote the same shape in location AS in
adresse.location as you mentioned, same problem.

If I change the "shape_field_name" parameter to test the errors changes:

ElasticSearchIllegalStateException[Shape with name [kiel] found but missing test field];

Maybe the problem ist within my pre-indexed shape. but elastic throws no
errors when indexing my polygon as geo_shape.

Here is a gist of the pre-indexed shape-data:
gist:e7e517fa0a2ec8db3ddc · GitHub

And here one of the complete mapping:
gist:30498f6aaa823f8b5ae1 · GitHub

thanks for your help :slight_smile:

Am Freitag, 21. Juni 2013 10:20:58 UTC+2 schrieb Florian Schilling:

Hi Christian,

have you tried to change the fieldname "adresse.location" to "location"?
If so could please provide an example of the data youre indexing? Which
version of ES are you using?

--Florian

On Thursday, June 20, 2013 10:17:30 AM UTC+2, Christian Hansen wrote:

I am trying to filter Objects in Elasticsearch with the geo_shape
filter, this is my mapping for the fields:

geo: {
6: {
properties: {
admin_level_text: {
type: "string",
include_in_all: false
},
location: {
type: "geo_shape",
}
}}}

but when I execute the query, I get an
ElasticSearchIllegalStateException. But when I dump the data, the field is
in the data.

Parse Failure [Failed to parse source [{ "query" :{ "filtered" :{ "query" :{ "match_all" :{ } },"filter" :{ "geo_shape" :{ "adresse.location" :{ "indexed_shape" :{ "id": "kiel", "type": "6", "index": "geo", "shape_field_name": "location" } } } } } } }]]]; nested: ElasticSearchIllegalStateException[Shape with name [kiel] found but missing location field]; }]

Any ideas?

--
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 Florian,

thx for your fast help.

i switched the location field to the beginning and it works as far as no
exception is thrown and the shape seems to be loaded. Now I have another
issue:

when i search for locations in the index where to search there are no
results referring the indexed shape. The loaction field is a geo_shape with
type point:

{
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"geo_shape": {
"location": {
"indexed_shape": {
"id": "hamburg",
"type": "4",
"index": "geo",
"shape_field_name": "location"
}
}
}
}
}
}
}

and this is the answer:

{
"took": 23,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 0,
"max_score": null,
"hits":
}
}

Am Freitag, 21. Juni 2013 16:53:54 UTC+2 schrieb Florian Schilling:

Hi Christian,

I'm working on your issue. So far I reconized, if the location field is
the first field in your data it works but I need to look a little deeper
into the things.

--Florian

On Friday, June 21, 2013 12:36:36 PM UTC+2, Christian Hansen wrote:

Hi Florian,

I am using es 0.90.1. I wrote the same shape in location AS in
adresse.location as you mentioned, same problem.

If I change the "shape_field_name" parameter to test the errors changes:

ElasticSearchIllegalStateException[Shape with name [kiel] found but missing test field];

Maybe the problem ist within my pre-indexed shape. but elastic throws no
errors when indexing my polygon as geo_shape.

Here is a gist of the pre-indexed shape-data:
gist:e7e517fa0a2ec8db3ddc · GitHub

And here one of the complete mapping:
gist:30498f6aaa823f8b5ae1 · GitHub

thanks for your help :slight_smile:

Am Freitag, 21. Juni 2013 10:20:58 UTC+2 schrieb Florian Schilling:

Hi Christian,

have you tried to change the fieldname "adresse.location" to "location"?
If so could please provide an example of the data youre indexing? Which
version of ES are you using?

--Florian

On Thursday, June 20, 2013 10:17:30 AM UTC+2, Christian Hansen wrote:

I am trying to filter Objects in Elasticsearch with the geo_shape
filter, this is my mapping for the fields:

geo: {
6: {
properties: {
admin_level_text: {
type: "string",
include_in_all: false
},
location: {
type: "geo_shape",
}
}}}

but when I execute the query, I get an
ElasticSearchIllegalStateException. But when I dump the data, the field is
in the data.

Parse Failure [Failed to parse source [{ "query" :{ "filtered" :{ "query" :{ "match_all" :{ } },"filter" :{ "geo_shape" :{ "adresse.location" :{ "indexed_shape" :{ "id": "kiel", "type": "6", "index": "geo", "shape_field_name": "location" } } } } } } }]]]; nested: ElasticSearchIllegalStateException[Shape with name [kiel] found but missing location field]; }]

Any ideas?

--
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 Christian,

it took me a while but I found the issue in the first place. The parsing of
indexed shapes searches the wrong fields. I opened an issue on github:

--Florian

On Monday, June 24, 2013 3:17:11 PM UTC+2, Christian Hansen wrote:

Hi Florian,

thx for your fast help.

i switched the location field to the beginning and it works as far as no
exception is thrown and the shape seems to be loaded. Now I have another
issue:

when i search for locations in the index where to search there are no
results referring the indexed shape. The loaction field is a geo_shape with
type point:

{
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"geo_shape": {
"location": {
"indexed_shape": {
"id": "hamburg",
"type": "4",
"index": "geo",
"shape_field_name": "location"
}
}
}
}
}
}
}

and this is the answer:

{
"took": 23,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 0,
"max_score": null,
"hits":
}
}

Am Freitag, 21. Juni 2013 16:53:54 UTC+2 schrieb Florian Schilling:

Hi Christian,

I'm working on your issue. So far I reconized, if the location field is
the first field in your data it works but I need to look a little deeper
into the things.

--Florian

On Friday, June 21, 2013 12:36:36 PM UTC+2, Christian Hansen wrote:

Hi Florian,

I am using es 0.90.1. I wrote the same shape in location AS in
adresse.location as you mentioned, same problem.

If I change the "shape_field_name" parameter to test the errors changes:

ElasticSearchIllegalStateException[Shape with name [kiel] found but missing test field];

Maybe the problem ist within my pre-indexed shape. but elastic throws no
errors when indexing my polygon as geo_shape.

Here is a gist of the pre-indexed shape-data:
gist:e7e517fa0a2ec8db3ddc · GitHub

And here one of the complete mapping:
gist:30498f6aaa823f8b5ae1 · GitHub

thanks for your help :slight_smile:

Am Freitag, 21. Juni 2013 10:20:58 UTC+2 schrieb Florian Schilling:

Hi Christian,

have you tried to change the fieldname "adresse.location" to
"location"? If so could please provide an example of the data youre
indexing? Which version of ES are you using?

--Florian

On Thursday, June 20, 2013 10:17:30 AM UTC+2, Christian Hansen wrote:

I am trying to filter Objects in Elasticsearch with the geo_shape
filter, this is my mapping for the fields:

geo: {
6: {
properties: {
admin_level_text: {
type: "string",
include_in_all: false
},
location: {
type: "geo_shape",
}
}}}

but when I execute the query, I get an
ElasticSearchIllegalStateException. But when I dump the data, the field is
in the data.

Parse Failure [Failed to parse source [{ "query" :{ "filtered" :{ "query" :{ "match_all" :{ } },"filter" :{ "geo_shape" :{ "adresse.location" :{ "indexed_shape" :{ "id": "kiel", "type": "6", "index": "geo", "shape_field_name": "location" } } } } } } }]]]; nested: ElasticSearchIllegalStateException[Shape with name [kiel] found but missing location field]; }]

Any ideas?

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

I got it. Really bad mistake of mine... I switched lon and lat.

Am Montag, 24. Juni 2013 15:17:11 UTC+2 schrieb Christian Hansen:

Hi Florian,

thx for your fast help.

i switched the location field to the beginning and it works as far as no
exception is thrown and the shape seems to be loaded. Now I have another
issue:

when i search for locations in the index where to search there are no
results referring the indexed shape. The loaction field is a geo_shape with
type point:

{
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"geo_shape": {
"location": {
"indexed_shape": {
"id": "hamburg",
"type": "4",
"index": "geo",
"shape_field_name": "location"
}
}
}
}
}
}
}

and this is the answer:

{
"took": 23,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 0,
"max_score": null,
"hits":
}
}

Am Freitag, 21. Juni 2013 16:53:54 UTC+2 schrieb Florian Schilling:

Hi Christian,

I'm working on your issue. So far I reconized, if the location field is
the first field in your data it works but I need to look a little deeper
into the things.

--Florian

On Friday, June 21, 2013 12:36:36 PM UTC+2, Christian Hansen wrote:

Hi Florian,

I am using es 0.90.1. I wrote the same shape in location AS in
adresse.location as you mentioned, same problem.

If I change the "shape_field_name" parameter to test the errors changes:

ElasticSearchIllegalStateException[Shape with name [kiel] found but missing test field];

Maybe the problem ist within my pre-indexed shape. but elastic throws no
errors when indexing my polygon as geo_shape.

Here is a gist of the pre-indexed shape-data:
gist:e7e517fa0a2ec8db3ddc · GitHub

And here one of the complete mapping:
gist:30498f6aaa823f8b5ae1 · GitHub

thanks for your help :slight_smile:

Am Freitag, 21. Juni 2013 10:20:58 UTC+2 schrieb Florian Schilling:

Hi Christian,

have you tried to change the fieldname "adresse.location" to
"location"? If so could please provide an example of the data youre
indexing? Which version of ES are you using?

--Florian

On Thursday, June 20, 2013 10:17:30 AM UTC+2, Christian Hansen wrote:

I am trying to filter Objects in Elasticsearch with the geo_shape
filter, this is my mapping for the fields:

geo: {
6: {
properties: {
admin_level_text: {
type: "string",
include_in_all: false
},
location: {
type: "geo_shape",
}
}}}

but when I execute the query, I get an
ElasticSearchIllegalStateException. But when I dump the data, the field is
in the data.

Parse Failure [Failed to parse source [{ "query" :{ "filtered" :{ "query" :{ "match_all" :{ } },"filter" :{ "geo_shape" :{ "adresse.location" :{ "indexed_shape" :{ "id": "kiel", "type": "6", "index": "geo", "shape_field_name": "location" } } } } } } }]]]; nested: ElasticSearchIllegalStateException[Shape with name [kiel] found but missing location field]; }]

Any ideas?

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