To add more, I am using RQL with "contains" the first placeholder is user_id which is passed dynamically, in this case atg-100 , the second placeholder is item count is set to 25 which is constant :-
RqlStatement statement = RqlStatement.parseRqlStatement(USER_ID +" contains ?0 ORDER BY NAME SORT DESC RANGE +?1");
RepositoryView view = rep.getView("user");
Object params = new Object;
items = statement.executeQuery(view, params);
please set loggingDebug to true at /atg/userprofiling/ProfileAdapterRepository and check the SQL generated to fetch that user,
hten you can validate the query at database level.