Let\'s assume I have books with titles indexed with ElasticSearch as following:
curl -XPUT \"http://localhost:9200/_river/books/_meta\" -d\'
{
\
Elasticsearch will apply the regexp to the terms produced by the tokenizer for that field, and not to the original text of the field.
You can use different tokenizer for indexing your fields or define the regex in such a way that it returns required documents with high score.
Example with keyword tokenizer:
'regexp': { title: '*(foo bar)*' }