Skip to content

Commit 26864e2

Browse files
committed
query changes
1 parent de948bc commit 26864e2

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎spring-data-solr/src/main/java/com/baeldung/spring/data/solr/repository/ProductRepository.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public interface ProductRepository extends SolrCrudRepository<Product, String> {
1313

1414
public List<Product> findByName(String name);
1515

16-
@Query("name:*?0* OR description:*?0*")
16+
@Query("id:*?0* OR name:*?0*")
1717
public Page<Product> findByCustomQuery(String searchTerm, Pageable pageable);
1818

1919
@Query(name = "Product.findByNamedQuery")
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Product.findByNamedQuery=name:*?0* OR description:*?0*
1+
Product.findByNamedQuery=id:*?0* OR name:*?0*

0 commit comments

Comments
 (0)