Repository: spring-cloud/spring-cloud-dataflow
Issue: Streams definitions search is broken

_From @oodamien on August 3, 2018 20:52_

https://github.com/spring-cloud/spring-cloud-dataflow/commit/4cb9d85ff2d78d239df3b1b8541514e4780f4a84#diff-1b8ed5096382d31ece0a8397f1eb4cf2R135

The search parameter has changed.

_Copied from original issue: spring-cloud/spring-cloud-dataflow-ui#875_

Changed files:
spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/service/impl/AbstractStreamService.java
spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/StreamDefinitionController.java
spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/service/StreamService.java

diff --git a/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/StreamDefinitionController.java b/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/StreamDefinitionController.java
index 576c92897..bf2e1296f 100644
--- a/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/StreamDefinitionController.java
+++ b/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/StreamDefinitionController.java
@@ -132,14 +132,14 @@ public class StreamDefinitionController {
 	 *
 	 * @param pageable Pagination information
 	 * @param assembler assembler for {@link StreamDefinition}
-	 * @param searchName optional findByNameLike parameter
+	 * @param search optional findByNameLike parameter
 	 * @return list of stream definitions
 	 */
 	@RequestMapping(value = "", method = RequestMethod.GET)
 	@ResponseStatus(HttpStatus.OK)
 	public PagedResources<StreamDefinitionResource> list(Pageable pageable,
-			@RequestParam(required = false) String searchName, PagedResourcesAssembler<StreamDefinition> assembler) {
-		Page<StreamDefinition> streamDefinitions = this.streamService.findDefinitionByNameLike(pageable, searchName);
+			@RequestParam(required = false) String search, PagedResourcesAssembler<StreamDefinition> assembler) {
+		Page<StreamDefinition> streamDefinitions = this.streamService.findDefinitionByNameLike(pageable, search);
 		return assembler.toResource(streamDefinitions, new Assembler(streamDefinitions));
 	}
 
diff --git a/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/service/StreamService.java b/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/service/StreamService.java
index 346e769ad..9fc29dab6 100644
--- a/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/service/StreamService.java
+++ b/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/service/StreamService.java
@@ -100,10 +100,10 @@ public interface StreamService {
 
 	/**
 	 * Find stream definitions where the findByNameLike parameter
-	 * @param searchName the findByNameLike parameter to use
+	 * @param search the findByNameLike parameter to use
 	 * @return Page of stream definitions
 	 */
-	Page<StreamDefinition> findDefinitionByNameLike(Pageable pageable, String searchName);
+	Page<StreamDefinition> findDefinitionByNameLike(Pageable pageable, String search);
 
 	/**
 	 * Find a stream definition by name.
diff --git a/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/service/impl/AbstractStreamService.java b/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/service/impl/AbstractStreamService.java
index c0abe89e3..3f8b2ddc9 100644
--- a/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/service/impl/AbstractStreamService.java
+++ b/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/service/impl/AbstractStreamService.java
@@ -213,10 +213,10 @@ public abstract class AbstractStreamService implements StreamService {
 	}
 
 	@Override
-	public Page<StreamDefinition> findDefinitionByNameLike(Pageable pageable, String searchName) {
+	public Page<StreamDefinition> findDefinitionByNameLike(Pageable pageable, String search) {
 		Page<StreamDefinition> streamDefinitions;
-		if (searchName != null) {
-			final SearchPageable searchPageable = new SearchPageable(pageable, searchName);
+		if (search != null) {
+			final SearchPageable searchPageable = new SearchPageable(pageable, search);
 			searchPageable.addColumns("DEFINITION_NAME", "DEFINITION");
 			streamDefinitions = streamDefinitionRepository.findByNameLike(searchPageable);
 			long count = streamDefinitions.getContent().size();