Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geo_point doesn't allow null values as of 1.1.0 #5680

Closed
lusid opened this Issue Apr 4, 2014 · 10 comments

Comments

Projects
None yet
8 participants
@lusid
Copy link

lusid commented Apr 4, 2014

After upgrading to 1.1.0, I found that my backend processes that perform bulk inserts/updates to ElasticSearch started failing with the following error:

MapperParsingException[failed to parse]; nested: ElasticsearchParseException[geo_point expected];

It seems that geo_point fields now require a non-null value for every document? Is there a way to bypass this behavior without having to change my ETL process to create fake geo_point coordinates?

@dadoonet

This comment has been minimized.

Copy link
Member

dadoonet commented Apr 4, 2014

Confirmed. I hit the same issue yesterday while moving some code from 1.0 to 1.1.

@dadoonet dadoonet added bug and removed bug labels Apr 4, 2014

@s1monw s1monw added v1.1.1 and removed v1.1.0 labels Apr 4, 2014

@dadoonet dadoonet self-assigned this Apr 4, 2014

@dadoonet dadoonet removed the v1.0.3 label Apr 4, 2014

dadoonet added a commit that referenced this issue Apr 4, 2014

`geo_point` doesn't allow null values
After upgrading to 1.1.0, sending null values to geo points produces the following error:

```
MapperParsingException[failed to parse]; nested: ElasticsearchParseException[geo_point expected];
```

Closes #5680.
Closes #5681.
(cherry picked from commit f582212)

@dadoonet dadoonet closed this in f582212 Apr 4, 2014

dadoonet added a commit that referenced this issue Apr 4, 2014

`geo_point` doesn't allow null values
After upgrading to 1.1.0, sending null values to geo points produces the following error:

```
MapperParsingException[failed to parse]; nested: ElasticsearchParseException[geo_point expected];
```

Closes #5680.
Closes #5681.
(cherry picked from commit f582212)
@dadoonet

This comment has been minimized.

Copy link
Member

dadoonet commented Apr 4, 2014

Pushed in 1.1, 1.x (1.2) and master branches.
1.0.2 is not affected by this issue.

@hkorte

This comment has been minimized.

Copy link
Contributor

hkorte commented Apr 4, 2014

I had the same problem migrating from 1.0.1 to 1.1.0, but I noticed that you can have missing values, if you completely omit the geo_point field instead of having something like "field:{}" or "field:null". See this gist: https://gist.github.com/hkorte/9936192

@lusid

This comment has been minimized.

Copy link
Author

lusid commented Apr 4, 2014

You are probably right, as we do not include null value fields in our ETL process. However, our bulk updates do fail when the geo_point fields are left out of the bulk request.

@hossein761

This comment has been minimized.

Copy link

hossein761 commented Apr 5, 2014

I just hit the same issue. Today I upgraded to 1.1. Should I wait for the next release for this fix? @dadoonet I got the 1.1 dependency today but this change is not there, i don't see it in the source code.

@dadoonet

This comment has been minimized.

Copy link
Member

dadoonet commented Apr 5, 2014

It will be in 1.1.1 which is not released yet. If you can't modify your injection, I guess you should wait for 1.1.1.

@d2kagw

This comment has been minimized.

Copy link

d2kagw commented Apr 7, 2014

+1 on the issue.
We've been able to change our code to work around the issue, but looking forward to having it fixed.

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015

`geo_point` doesn't allow null values
After upgrading to 1.1.0, sending null values to geo points produces the following error:

```
MapperParsingException[failed to parse]; nested: ElasticsearchParseException[geo_point expected];
```

Closes elastic#5680.
Closes elastic#5681.
(cherry picked from commit f582212)
@Tonkpils

This comment has been minimized.

Copy link

Tonkpils commented Sep 24, 2015

This still seems to be an issue in ES 1.7.1

@clintongormley

This comment has been minimized.

Copy link
Member

clintongormley commented Sep 25, 2015

@Tonkpils this works just fine in 1.7.1:

PUT t
{
  "mappings": {
    "t": {
      "properties": {
        "loc": {
          "type": "geo_point"
        }
      }
    }
  }
}

PUT t/t/1
{
  "loc": null
}
@Tonkpils

This comment has been minimized.

Copy link

Tonkpils commented Sep 25, 2015

You're right, it was an issue with the incoming parameters where Lon and lat were null. Apologies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.