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

reindex doesn't accept comma separated values as inputs #51949

Closed
Mekk opened this issue Feb 5, 2020 · 6 comments · Fixed by #52044
Closed

reindex doesn't accept comma separated values as inputs #51949

Mekk opened this issue Feb 5, 2020 · 6 comments · Fixed by #52044
Assignees
Labels
:Distributed Indexing/Reindex Issues relating to reindex that are not caused by issues further down >docs General docs changes

Comments

@Mekk
Copy link

Mekk commented Feb 5, 2020

I am trying to merge few small indices into one bigger. It looks like comma-separated list is not supported, contrary to docs. Tested on Elasticsearch 7.5.1.

According to https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html page

 index
    (Required, string) The name of the index you are copying from. Also accepts a comma-separated list of indices to reindex from multiple sources. 

So I tried comma separated list:

POST /_reindex?pretty
{"conflicts": "proceed",
  "source": {
    "index": "sfx-pb-1.3.0-2020.03.02,sfx-pb-1.3.0-2020.03.03"
  },
  "dest": {"index": "sfx-pb-1.3.0-2020.03", "op_type": "create"}}

(both indexes mentioned in source exist what GET /sfx-pb-1.3.0-2020.03.02,sfx-pb-1.3.0-2020.03.03 gladly confirmed).

Result:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "index_not_found_exception",
        "reason" : "no such index [sfx-pb-1.3.0-2020.03.02,sfx-pb-1.3.0-2020.03.03]",
        "resource.type" : "index_or_alias",
        "resource.id" : "sfx-pb-1.3.0-2020.03.02,sfx-pb-1.3.0-2020.03.03",
        "index_uuid" : "_na_",
        "index" : "sfx-pb-1.3.0-2020.03.02,sfx-pb-1.3.0-2020.03.03"
      }
    ],
    "type" : "index_not_found_exception",
    "reason" : "no such index [sfx-pb-1.3.0-2020.03.02,sfx-pb-1.3.0-2020.03.03]",
    "resource.type" : "index_or_alias",
    "resource.id" : "sfx-pb-1.3.0-2020.03.02,sfx-pb-1.3.0-2020.03.03",
    "index_uuid" : "_na_",
    "index" : "sfx-pb-1.3.0-2020.03.02,sfx-pb-1.3.0-2020.03.03"
  },
  "status" : 404
}
@Mekk Mekk changed the title reindex doesn't accept comma separated values or wildcards as inputs reindex doesn't accept comma separated values as inputs Feb 5, 2020
@Mekk
Copy link
Author

Mekk commented Feb 5, 2020

(edited as it turned out that globbed value didn't work for me because index was frozen – but for comma-separated values problem persists also after reopening them)

@cbuescher cbuescher added the :Distributed Indexing/Reindex Issues relating to reindex that are not caused by issues further down label Feb 5, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (:Distributed/Reindex)

@cbuescher
Copy link
Member

Also accepts a comma-separated list of indices to reindex from multiple sources.

I think this could be read as something like:

"source": {
    "index": [ "sfx-pb-1.3.0-2020.03.02", "sfx-pb-1.3.0-2020.03.03" ]
  }

Have you tried that as well?

@Mekk
Copy link
Author

Mekk commented Feb 5, 2020

No, doc seems to be clearly stating that this param is of type string (and I would never consider array to be „comma separated value” in any case). I will give this format a try next time.

@Mekk
Copy link
Author

Mekk commented Feb 5, 2020

Looks like sth started using array format. So this is documentation issue - doc should state it clearly and provide an example.

(the same also applies to glob format, which also doesn't have any example and isn't even mentioned in field description)

@cbuescher cbuescher added the >docs General docs changes label Feb 5, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs (>docs)

@jrodewig jrodewig self-assigned this Feb 5, 2020
henningandersen added a commit to henningandersen/elasticsearch that referenced this issue Feb 7, 2020
Added ability to specify comma separated list of source indices without
array. Also fixed so that empty string results in validation error
rather than index does not exist.

Closes elastic#51949
henningandersen added a commit that referenced this issue Feb 19, 2020
Added ability to specify comma separated list of source indices without
array. Also fixed so that empty string results in validation error
rather than index does not exist.

Closes #51949
henningandersen added a commit that referenced this issue Feb 19, 2020
Added ability to specify comma separated list of source indices without
array. Also fixed so that empty string results in validation error
rather than index does not exist.

Closes #51949
henningandersen added a commit that referenced this issue Feb 19, 2020
Added ability to specify comma separated list of source indices without
array. Also fixed so that empty string results in validation error
rather than index does not exist.

Closes #51949
sbourke pushed a commit to sbourke/elasticsearch that referenced this issue Feb 19, 2020
Added ability to specify comma separated list of source indices without
array. Also fixed so that empty string results in validation error
rather than index does not exist.

Closes elastic#51949
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Indexing/Reindex Issues relating to reindex that are not caused by issues further down >docs General docs changes
Projects
None yet
4 participants