Skip to content

Reindex-from-remote fails for external versions #31908

@nik9000

Description

@nik9000

It looks to me like reindex-from-remote fails for version_type=external:

curl -XDELETE localhost:9200/test1
curl -XDELETE localhost:9200/test2

curl -HContent-Type:application/json -XPUT localhost:9200/test1 -d'{
  "mappings": {
    "document": {
      "properties": {
        "id": {
          "type": "keyword"
        },
        "field_str": {
          "type": "text"
        }
      }
    }
  }
}'

curl -HContent-Type:application/json -XPOST 'localhost:9200/test1/document/1?version=526&version_type=external&refresh=true' -d'{
  "id": 1,
  "field_str": "val1"
}'
curl -HContent-Type:application/json -XPOST 'localhost:9200/test1/document/2?version=527&version_type=external&refresh=true' -d'{
  "id": 2,
  "field_str": "val2"
}'

curl -HContent-Type:application/json -XPUT localhost:9200/test2 -d'{
  "mappings": {
    "document": {
      "properties": {
        "id": {
          "type": "keyword"
        },
        "field_str": {
          "type": "text"
        }
      }
    }
  }
}'

#Reindex using version_type external
curl -HContent-Type:application/json -XPOST localhost:9200/_reindex?pretty -d'{
  "conflicts": "proceed",
  "source": {
    "size": 1,
    "remote": {
      "host": "http://127.0.0.1:9200"
    },
    "index": "test1"
  },
  "dest": {
    "index": "test2",
    "version_type": "external"
  }
}'

It looks like we don't have any tests for reindex-from-remote and version_type=external which seems like a big whole.

It is also worth looking in to combining version_type=external with op_type. I don't recall that being a valid thing to do but I don't see anything stopping it. I'm not sure that it'll work properly though.

Metadata

Metadata

Assignees

Labels

:Distributed Indexing/ReindexIssues relating to reindex that are not caused by issues further down>bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions