mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-24 17:09:48 +00:00
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…
x
Reference in New Issue
Block a user