private static Bson prefixQuery(String fieldName, String prefix){
        return Filters.regex(fieldName, "^" + RegexEscape.escape(prefix) + ".*");
    }
private static Bson prefixQuery ( String fieldName , String prefix ) { return Filters . regex ( fieldName , "^" + RegexEscape . escape ( prefix ) + ".*" ) ; }
enables index range scan