Boosting results based on another field?

Hi,

I'm new to ElasticSearch, trying to see if I could migrate a website from Solr to ES.

One of the features I need is to boost search results based on the value of another field. All my documents have a field "popularity" which is an integer. When a user makes a search, I want to return results that are the best match but also take popularity into account.

Right now in Solr when someone searches for "foo" I do something like:

q={!boost b=log(popularity)}foo

which basically multiplies the "natural" scoring of a document with the log of the popularity of that document.

Is it possible to do something similar in ElasticSearch?

Thanks.