Skip to content

Conversation

@taylorotwell
Copy link
Member

This makes a couple of improvements to full-text support when using the database engine.

  • Just pass multiple columns to orWhereFullText in a single call.
  • When using Postgres and no other developer provided ordering has been defined, automatically add relevance based ordering by default to match MySQL's built-in ordering behavior.

return $query->where(function ($query) use ($builder, $columns, $prefixColumns, $fullTextColumns) {
$connectionType = $builder->model->getConnection()->getDriverName();
[$connectionType] = [
$builder->model->getConnection()->getDriverName(),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be $builder->modelConnectionType() ?

$connectionType = $builder->model->getConnection()->getDriverName();
[$connectionType] = [
$builder->modelConnectionType(),
];
Copy link

@MeiKatz MeiKatz Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to bother you again but why are you converting the model connection type to an array with one element just to retrieve the first and only element right after? Wouldn't it be easier to assign the connection type directly?

$connectionType = $builder->modelConnectionType();

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I was assigning multiple variables here in an earlier version.

@taylorotwell taylorotwell merged commit a8fea31 into 10.x Oct 10, 2025
21 checks passed
@taylorotwell taylorotwell deleted the fulltext branch October 10, 2025 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants