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

Blank routing should be ignored #1450

Closed
clintongormley opened this issue Nov 10, 2011 · 0 comments
Closed

Blank routing should be ignored #1450

clintongormley opened this issue Nov 10, 2011 · 0 comments

Comments

@clintongormley
Copy link

A blank routing parameter should be treated in the same way as no routing parameter. Currently it still has an effect:

# [Thu Nov 10 12:48:16 2011] Protocol: http, Server: 127.0.0.2:9200
curl -XPUT 'http://127.0.0.1:9200/test/?pretty=1' 

# [Thu Nov 10 12:48:16 2011] Response:
# {
#    "ok" : true,
#    "acknowledged" : true
# }

# [Thu Nov 10 12:48:18 2011] Protocol: http, Server: 127.0.0.2:9200
curl -XPUT 'http://127.0.0.1:9200/test/bar/1?pretty=1'  -d '
{
   "foo" : 1
}
'

# [Thu Nov 10 12:48:18 2011] Response:
# {
#    "ok" : true,
#    "_index" : "test",
#    "_id" : "1",
#    "_type" : "bar",
#    "_version" : 1
# }

# [Thu Nov 10 12:48:21 2011] Protocol: http, Server: 127.0.0.2:9200
curl -XPUT 'http://127.0.0.1:9200/test/bar/1?pretty=1&routing='  -d '
{
   "foo" : 1
}
'

# [Thu Nov 10 12:48:21 2011] Response:
# {
#    "ok" : true,
#    "_index" : "test",
#    "_id" : "1",
#    "_type" : "bar",
#    "_version" : 1
# }

# [Thu Nov 10 12:48:31 2011] Protocol: http, Server: 127.0.0.2:9200
curl -XPOST 'http://127.0.0.1:9200/test/_refresh?pretty=1' 

# [Thu Nov 10 12:48:31 2011] Response:
# {
#    "ok" : true,
#    "_shards" : {
#       "failed" : 0,
#       "successful" : 5,
#       "total" : 10
#    }
# }

# [Thu Nov 10 12:48:35 2011] Protocol: http, Server: 127.0.0.2:9200
curl -XGET 'http://127.0.0.1:9200/test/_search?pretty=1' 

# [Thu Nov 10 12:48:35 2011] Response:
# {
#    "hits" : {
#       "hits" : [
#          {
#             "_source" : {
#                "foo" : 1
#             },
#             "_score" : 1,
#             "_index" : "test",
#             "_id" : "1",
#             "_type" : "bar"
#          },
#          {
#             "_source" : {
#                "foo" : 1
#             },
#             "_score" : 1,
#             "_index" : "test",
#             "_id" : "1",
#             "_type" : "bar"
#          }
#       ],
#       "max_score" : 1,
#       "total" : 2
#    },
#    "timed_out" : false,
#    "_shards" : {
#       "failed" : 0,
#       "successful" : 5,
#       "total" : 5
#    },
#    "took" : 1
# }
@kimchy kimchy closed this as completed in f4adff6 Nov 13, 2011
dadoonet pushed a commit to dadoonet/elasticsearch that referenced this issue Nov 16, 2011
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
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