Trailing '?' bug

Hi Matt,
I ran into a bug that came to my attention mainly when I tried using IndexWithParameters and specifying a parentId.

The "bug" was occurring in the ElasticSearhRequest function (line 77) in the string formatter 
: "%s://%s:%s%s?%s"
The issue occurs when the 5th parameter "query" is not specified i.e blank, this caused the URL to be created with a trailing "?".  This resulted in elasticsearch adding a trailing "?" to the _parent field in the child documents.

I proposed a solution in this pull request, let me know what you think.