Skip to content

[BUG] OS 1.3.7 -> OS 2.19 transformation error TextNode cannot be cast to ObjectNode #1821

@ragu2003

Description

@ragu2003

What is the bug?

When we do console metadata evaluate we get the following error
ERROR - test_index failed to transform to the target version: Transformation for index index test_index failed due to class com.fasterxml.jackson.databind.node.TextNode cannot be cast to class com.fasterxml.jackson.databind.node.ObjectNode
(com.fasterxml.jackson.databind.node.TextNode and com.fasterxml.jackson.databind.node.ObjectNode are in unnamed module of loader 'app')

What are your migration environments?

Source: OS 1.3.7
Target: OS 2.19
MigrationAssistant: 2.5.0

How can one reproduce the bug?

Create an index with the following setting:

{
    "settings": {
      "index": {
        "number_of_shards": "1",
        "provided_name": "test-migrations-reindex-fixed",
        "knn.space_type": "cosinesimil",
        "knn": "true",
        "creation_date": "1757078780188",
        "number_of_replicas": "1",
        "uuid": "_5TwzpZUQKa37bAjmf6EAQ",
        "version": {
          "created": "135248527",
          "upgraded": "136407827"
        }
      }
    }
}

What is the expected behavior?

Migration assistant should transform this correctly and send this for indexing.

Do you have any additional context?

I suspect it is happening because of these two settings:

"knn.space_type": "cosinesimil",
"knn": "true"

Migration assistant tries to construct a map like this:
knn: {
space_type: cosinesimil
}
When it reads "knn": "true", the textnode collides with the object node.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions