Class SiteSearchController
java.lang.Object
org.craftercms.core.controller.rest.RestControllerBase
org.craftercms.engine.controller.rest.SiteSearchController
@CrafterRestController
@RequestMapping({"${crafter.core.rest.base.uri}/site/search","${crafter.core.rest.base.uri}/site/elasticsearch"})
public class SiteSearchController
extends org.craftercms.core.controller.rest.RestControllerBase
REST controller to expose the Search service
- Author:
- joseross
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final com.fasterxml.jackson.databind.ObjectMapperprotected final SiteAwareOpenSearchServicestatic final Stringstatic final Stringstatic final StringFields inherited from class org.craftercms.core.controller.rest.RestControllerBase
MESSAGE_MODEL_ATTRIBUTE_NAME, REST_BASE_URI -
Constructor Summary
ConstructorsConstructorDescriptionSiteSearchController(SiteAwareOpenSearchService searchService, com.fasterxml.jackson.databind.ObjectMapper objectMapper, String[] restrictedKeyPatterns) -
Method Summary
Methods inherited from class org.craftercms.core.controller.rest.RestControllerBase
createResponseMessage, createSingletonModifiableMap
-
Field Details
-
URL_ROOT
- See Also:
-
URL_ES_ROOT
- See Also:
-
URL_SEARCH
- See Also:
-
searchService
-
objectMapper
protected final com.fasterxml.jackson.databind.ObjectMapper objectMapper -
restrictedKeyPatterns
-
-
Constructor Details
-
SiteSearchController
@ConstructorProperties({"searchService","objectMapper","restrictedKeyPatterns"}) public SiteSearchController(SiteAwareOpenSearchService searchService, com.fasterxml.jackson.databind.ObjectMapper objectMapper, String[] restrictedKeyPatterns)
-
-
Method Details
-
search
@PostMapping(value="/search", consumes="application/json") public void search(@RequestBody com.fasterxml.jackson.databind.JsonNode request, @RequestParam Map<String, Object> parameters, jakarta.servlet.http.HttpServletResponse response) throws IOException- Throws:
IOException
-