When I search for apps, what determines the order in which they are ranked? When I search for apps in the Google Play Store, what is the determining factor of the order in which they are presented to me?

Is it the number of downloads? Or reviews? Or total star rating?

Thanks!
Its a combination of the three, plus more. Google play store factors in what you like (e.g. the "like installed apps" tab) the popularity (which is also the only factor of the "top [insert catetrgory that's not grossing here), how much money the app is making and its overall rating. Apps marked as editors choice have their own tab, but don't get shoved up to the top of the other categories unless they should be there for whatever reason applies.