Adds query function parameter to boost_where

In some cases it is actual to have other function_score query than the `term` query. The pull requests add such ability.