404 when querying for alias soon after creation

When create an alias and then query for existence of that alias using GET /*/_alias/<alias_name> I'm sometimes getting 404s even though the alias definitely exists. Then what ends up happening is my app mistakenly recreates the alias, which now points to two indexes, and then I can't index new documents.

  1. Is it expected that /*/_alias/<alias_name> can sometimes return a 404 even though the alias exists? e.g., with freshly created aliases?
  2. If that's the case, how can I wait until the alias is fully ready before proceeding?


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.