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

mget doesn't work with aliases #1130

Closed
clintongormley opened this issue Jul 19, 2011 · 0 comments
Closed

mget doesn't work with aliases #1130

clintongormley opened this issue Jul 19, 2011 · 0 comments

Comments

@clintongormley
Copy link

# [Tue Jul 19 10:43:16 2011] Protocol: http, Server: 192.168.5.103:9200
curl -XPUT 'http://127.0.0.1:9200/foo_1/foo/1?pretty=1'  -d '
{
   "foo" : "bar"
}
'

# [Tue Jul 19 10:43:16 2011] Response:
# {
#    "ok" : true,
#    "_index" : "foo_1",
#    "_id" : "1",
#    "_type" : "foo",
#    "_version" : 1
# }

# [Tue Jul 19 10:43:18 2011] Protocol: http, Server: 192.168.5.103:9200
curl -XPOST 'http://127.0.0.1:9200/_aliases?pretty=1'  -d '
{
   "actions" : [
      {
         "add" : {
            "index" : "foo_1",
            "alias" : "foo"
         }
      }
   ]
}
'

# [Tue Jul 19 10:43:18 2011] Response:
# {
#    "ok" : true,
#    "acknowledged" : true
# }

# [Tue Jul 19 10:43:20 2011] Protocol: http, Server: 192.168.5.103:9200
curl -XGET 'http://127.0.0.1:9200/foo/_mget?pretty=1'  -d '
{
   "docs" : [
      {
         "_id" : 1
      }
   ]
}
'

# [Tue Jul 19 10:43:20 2011] Response:
# {
#    "status" : 404,
#    "error" : "IndexMissingException[[foo] missing]"
# }
@kimchy kimchy closed this as completed in 8f6de29 Jul 19, 2011
ofavre pushed a commit to yakaz/elasticsearch that referenced this issue Jul 21, 2011
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
emilykmarx pushed a commit to emilykmarx/elasticsearch that referenced this issue Dec 26, 2023
Ensures that a url's healthcheck is a success before marking it alive in the pool
Ensures that the version of the connected Elasticsearch is retrieved successfully before allowing the connection to be marked as alive
Eliminates a crash that can occur when HTTP connection can be established and the connected resource isn't Elasticsearch (e.g., Elastic Cloud returning an HTTP 404 Not Found)

* logging: ensure we log sanitized url

While our logging framework is known to send `Object#to_s` to the
objects we pass it, we should not rely on that and shoukd instead
consistently sanitize our url when logging.

* pool: require SUCCESSFUL http response for connection

The Manticore Adapter we provide counts an HTTP 404 Not Found to be
non-exceptional, which causes our healthcheck connection reestablishing
to succeed when the server it connects to reports that the endpoint
cannot be found.

Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants