Add back string op type to IndexRequest

This was removed by accident I think, and it breaks backward comp. on the Java API in minor 1.3 version
closes #7387
This commit is contained in:
Shay Banon 2014-08-21 11:39:59 -07:00
parent 887bd0a9c2
commit ffcc78ca04
1 changed files with 9 additions and 0 deletions

View File

@ -483,6 +483,15 @@ public class IndexRequest extends ShardReplicationOperationRequest<IndexRequest>
return this; return this;
} }
/**
* Sets a string representation of the {@link #opType(org.elasticsearch.action.index.IndexRequest.OpType)}. Can
* be either "index" or "create".
*/
public IndexRequest opType(String opType) throws ElasticsearchIllegalArgumentException {
return opType(OpType.fromString(opType));
}
/** /**
* Set to <tt>true</tt> to force this index to use {@link OpType#CREATE}. * Set to <tt>true</tt> to force this index to use {@link OpType#CREATE}.
*/ */