You can clone with
HTTPS or Subversion.
Under sorting in elasticsearch ,The 'missing' parameter specifies how docs which are missing a field should be treated: The missing value can be set to _last, _first, or a custom value (that will be used for missing docs as the sort value).
More details can be found in this.
Does the API support configuring this parameter ?