What is the locale that is set when doing this search? There could be an interaction with boost::locale::fold_case() involved here, because the default mode for "any-contains" is case-insentive.