diff --git a/src/main/kotlin/com/petqua/domain/keyword/ProductKeywordCustomRepositoryImpl.kt b/src/main/kotlin/com/petqua/domain/keyword/ProductKeywordCustomRepositoryImpl.kt index 2b46ff7b..4d95b73d 100644 --- a/src/main/kotlin/com/petqua/domain/keyword/ProductKeywordCustomRepositoryImpl.kt +++ b/src/main/kotlin/com/petqua/domain/keyword/ProductKeywordCustomRepositoryImpl.kt @@ -25,7 +25,9 @@ class ProductKeywordCustomRepositoryImpl( ).whereAnd( path(ProductKeyword::word).like(pattern = "%$word%", escape = ESCAPE_LETTER) ).orderBy( - length(path(ProductKeyword::word)).asc(), path(ProductKeyword::word).asc() + locate(word, path(ProductKeyword::word)).asc(), + length(path(ProductKeyword::word)).asc(), + path(ProductKeyword::word).asc() ) }