- // Tell it not to reorder the query. But not when tag filtering was used, as it seems as likely
- // to be harmed as helped in that case.
- if ( !$this->mTagFilter ) {
+ // Tell it not to reorder the query. But not when tag filtering or log_search was used, as it
+ // seems as likely to be harmed as helped in that case.
+ if ( !$this->mTagFilter && !array_key_exists( 'ls_field', $this->mConds ) ) {