Tune query by document parameters