Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
@RequestMapping(value = "/dismax-search")
@ApiOperation(value = "Performs dismax search and returns a list of posts containing the value input")
public Map<String, List<ElasticsearchPost>> dismaxSearch(@RequestParam("value") String value,
@RequestParam("start") int start,
@RequestParam("size") int size,
@RequestParam("minScore") float minScore) {
List<ElasticsearchPost> elasticsearchPosts = elasticsearchService.dismaxSearch(value, start, size, minScore);
Map<String, List<ElasticsearchPost>> elasticsearchPostMap = new HashMap<>();
elasticsearchPostMap.put("ElasticsearchPosts", elasticsearchPosts);
return elasticsearchPostMap;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment