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
Closed

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

lusid opened this issue Apr 4, 2014 · 10 comments
Assignees
Labels
>bug >regression :Search/Mapping Index mappings, including merging and defining field types v1.1.1 v1.2.0 v2.0.0-beta1

Comments

@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
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 pushed a commit that referenced this issue Apr 4, 2014
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 pushed a commit that referenced this issue Apr 4, 2014
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
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
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
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
Copy link

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
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
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
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)
@clintongormley clintongormley added the :Search/Mapping Index mappings, including merging and defining field types label Aug 13, 2015
@Tonkpils
Copy link

This still seems to be an issue in ES 1.7.1

@clintongormley
Copy link

@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
Copy link

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
Labels
>bug >regression :Search/Mapping Index mappings, including merging and defining field types v1.1.1 v1.2.0 v2.0.0-beta1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants