Class SiteElasticsearchController
- java.lang.Object
-
- org.craftercms.core.controller.rest.RestControllerBase
-
- org.craftercms.engine.controller.rest.SiteElasticsearchController
-
@RestController @RequestMapping("${crafter.core.rest.base.uri}/site/elasticsearch") public class SiteElasticsearchController extends org.craftercms.core.controller.rest.RestControllerBase
REST controller to expose the Elasticsearch service- Author:
- joseross
-
-
Field Summary
Fields Modifier and Type Field Description protected SiteAwareElasticsearchService
elasticsearchService
static String
URL_ROOT
static String
URL_SEARCH
-
Constructor Summary
Constructors Constructor Description SiteElasticsearchController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
search(Map<String,Object> request, Map<String,Object> parameters, javax.servlet.http.HttpServletResponse response)
void
setElasticsearchService(SiteAwareElasticsearchService elasticsearchService)
-
-
-
Field Detail
-
URL_ROOT
public static final String URL_ROOT
- See Also:
- Constant Field Values
-
URL_SEARCH
public static final String URL_SEARCH
- See Also:
- Constant Field Values
-
elasticsearchService
protected SiteAwareElasticsearchService elasticsearchService
-
-
Method Detail
-
setElasticsearchService
public void setElasticsearchService(SiteAwareElasticsearchService elasticsearchService)
-
search
@PostMapping("/search") public void search(@RequestBody Map<String,Object> request, @RequestParam Map<String,Object> parameters, javax.servlet.http.HttpServletResponse response) throws IOException
- Throws:
IOException
-
-