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

[BUG] Broken Upgrade from 2.7 to 2.9 for Indices with GeoShape mappings #10958

Closed
mgodwan opened this issue Oct 27, 2023 · 7 comments · Fixed by #11095
Closed

[BUG] Broken Upgrade from 2.7 to 2.9 for Indices with GeoShape mappings #10958

mgodwan opened this issue Oct 27, 2023 · 7 comments · Fixed by #11095
Assignees
Labels
bug Something isn't working Geospatial Indexing Indexing, Bulk Indexing and anything related to indexing

Comments

@mgodwan
Copy link
Member

mgodwan commented Oct 27, 2023

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Create an index in OS 2.7
PUT testindex
{
  "mappings": {
    "properties": {
      "location": {
        "type": "geo_shape"
      }
    }
  }
}

  1. Add documents to the index
POST testindex/_doc
{
  "location" : {
    "type" : "point",
    "coordinates" : [74.00, 40.71]
  }
}
  1. Ensure segments are persisted POST testindex/_refresh , POST testindex/_flush
  2. Upgrade the cluster to OS 2.9
  3. Try ingesting the document with geo shape fields again on the same index. Following error is seen:
{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "cannot change field \"location\" from doc values type=NONE to inconsistent doc values type=BINARY"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "cannot change field \"location\" from doc values type=NONE to inconsistent doc values type=BINARY"
  },
  "status": 400
}

Expected behavior
Indexing Requests should go through

Screenshots
NA

Host/Environment (please complete the following information):

  • OS: t3.medium AL2
  • Version: OS 2.9

Additional context
Refer To Reproduce

@mgodwan mgodwan added bug Something isn't working untriaged labels Oct 27, 2023
@mgodwan
Copy link
Member Author

mgodwan commented Oct 27, 2023

Seems related to the PR: #4266 where docValues have been enabled by default for geo_shape fields due to which Lucene is throwing error

@mgodwan
Copy link
Member Author

mgodwan commented Oct 27, 2023

@navneet1v @nknize @heemin32 Any thoughts on this?

@mgodwan mgodwan added Geospatial Indexing Indexing, Bulk Indexing and anything related to indexing and removed untriaged labels Oct 27, 2023
@navneet1v
Copy link
Contributor

navneet1v commented Oct 27, 2023

@mgodwan can we do the re-indexing as of now to remove the issue. Meanwhile I can see if there is a way to get around this problem.

@mgodwan
Copy link
Member Author

mgodwan commented Oct 27, 2023

Yes, that is a possible workaround which I was able to validate.

@navneet1v
Copy link
Contributor

Closing this issue as the changes are merged and backported till 2.11.1 .

@tmturpi
Copy link

tmturpi commented Apr 4, 2024

What version of OpenSearch resolves this issue? Re-indexing did not resolve the issue for our team.

@navneet1v
Copy link
Contributor

@tmturpi you can either use Opensearch version 2.11.1 or greater.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Geospatial Indexing Indexing, Bulk Indexing and anything related to indexing
Projects
None yet
3 participants