Related to this:
I have a key that looks like an integer in some cases (it is just a sequence of characters). When the string based key looks like a integer, this code in Query.java treats it as one and doesn't quote it:
// Special case
return key + "=" + value;
else if (value instanceof Stale)
return key + "=" + ((Stale) value).toString();
else if (StringUtils.isJsonObject(value.toString()))
return key + "=" + value.toString();
return key + "=\"" + value + "\"";
For some reason a string like 100 will trigger the StringUtils.isJsonObject to return true.
Passing in a quoted string like "100" ends up NOT firing that same code (even though it is a valid JSON object) which ends up double quoting the string.
As such, for keys that look like "integers", the current Query code fails to return any documents since it is either passing through the literal 100 or the literal ""100"".