Skip to content

Commit

Permalink
Fixed bug with 3 letter words
Browse files Browse the repository at this point in the history
Fixes #118
  • Loading branch information
ajaydsouza committed Jan 2, 2025
1 parent 17e2389 commit 60ff3bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion includes/class-better-search-core-query.php
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ public function posts_orderby( $orderby, $query ) {
// Initialize an array to build the orderby clauses.
$orderby_clauses = array();

if ( ! empty( $this->use_fulltext ) || empty( $this->match_sql ) ) {
if ( ! empty( $this->use_fulltext ) && ! empty( $this->match_sql ) ) {
$orderby_clauses[] = ' score DESC ';
}

Expand Down
5 changes: 5 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ You can report security bugs through the Patchstack Vulnerability Disclosure Pro

== Changelog ==

= 4.0.4 =

* Bug fixes:
* Search terms with three or less characters threw an error.

= 4.0.3 =

Release post: [https://webberzone.com/announcements/better-search-v4-enhance-wordpress-search-with-pro-features/](https://webberzone.com/announcements/better-search-v4-enhance-wordpress-search-with-pro-features/)
Expand Down

0 comments on commit 60ff3bd

Please sign in to comment.