Blank routing should be ignored, closes #1450.
This commit is contained in:
parent
da98aab13f
commit
f4adff652c
|
@ -185,7 +185,11 @@ public class DeleteRequest extends ShardReplicationOperationRequest {
|
|||
* and not the id.
|
||||
*/
|
||||
public DeleteRequest routing(String routing) {
|
||||
this.routing = routing;
|
||||
if (routing != null && routing.length() == 0) {
|
||||
this.routing = null;
|
||||
} else {
|
||||
this.routing = routing;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
@ -248,7 +248,11 @@ public class IndexRequest extends ShardReplicationOperationRequest {
|
|||
* and not the id.
|
||||
*/
|
||||
public IndexRequest routing(String routing) {
|
||||
this.routing = routing;
|
||||
if (routing != null && routing.length() == 0) {
|
||||
this.routing = null;
|
||||
} else {
|
||||
this.routing = routing;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue