I think I was confused here about what make_v2 query was attempting to do.  I'm forcing this to false at this stage to make sure that a passed term_regexp is ignored when it doesn't make sense in context (e.g. if it is a bucket/key query or an exact term match).  This is what I thought was going on between riak_index:return_terms/2 and make_v2_query, and so I was trying to do something similar between riak_index:apply_regex/2 and make_v2_query.  

If I leave these as undefined, then I may pass a regular expression through when it made no sense, as apply_regex wouldn't detect this.  

I suspect I've just got the wrong end of the stick here so some further advice would be helpful.