@Controller @RequestMapping(value="/api/1/search") public class SearchRestController extends Object
| Constructor and Description |
|---|
SearchRestController() |
| Modifier and Type | Method and Description |
|---|---|
String |
commit(String indexId) |
String |
delete(String indexId,
String site,
String id) |
protected Map<String,String> |
getAdditionalFields(javax.servlet.http.HttpServletRequest request) |
protected org.springframework.util.MultiValueMap<String,String> |
getAdditionalMultiValueFields(javax.servlet.http.HttpServletRequest request) |
void |
handleException(Exception e,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
Map<String,Object> |
search(String indexId,
javax.servlet.http.HttpServletRequest request) |
void |
setQueryFactory(QueryFactory<Query> queryFactory) |
void |
setSearchService(SearchService searchService) |
String |
update(String indexId,
String site,
String id,
boolean ignoreRootInFieldNames,
String xml) |
String |
updateDocument(String site,
String id,
org.springframework.web.multipart.MultipartFile document,
javax.servlet.http.HttpServletRequest request)
Deprecated.
|
String |
updateFile(String indexId,
String site,
String id,
org.springframework.web.multipart.MultipartFile file,
javax.servlet.http.HttpServletRequest request) |
public void setSearchService(SearchService searchService)
public void setQueryFactory(QueryFactory<Query> queryFactory)
@RequestMapping(value="/search",
method=GET)
@ResponseBody
public Map<String,Object> search(@RequestParam(value="indexId",required=false)
String indexId,
javax.servlet.http.HttpServletRequest request)
throws SearchException
SearchException@RequestMapping(value="/update",
method=POST)
@ResponseBody
public String update(@RequestParam(value="indexId",required=false)
String indexId,
@RequestParam(value="site")
String site,
@RequestParam(value="id")
String id,
@RequestParam(value="stripRoot")
boolean ignoreRootInFieldNames,
@RequestBody
String xml)
throws SearchException
SearchException@RequestMapping(value="/delete",
method=POST)
@ResponseBody
public String delete(@RequestParam(value="indexId",required=false)
String indexId,
@RequestParam(value="site")
String site,
@RequestParam(value="id")
String id)
throws SearchException
SearchException@RequestMapping(value="/commit",
method=POST)
@ResponseBody
public String commit(@RequestParam(value="indexId",required=false)
String indexId)
throws SearchException
SearchException@RequestMapping(value={"/update-document","/partial-document-update"},
method=POST)
@ResponseBody
@Deprecated
public String updateDocument(@RequestPart(value="site")
String site,
@RequestPart(value="id")
String id,
@RequestPart(value="document")
org.springframework.web.multipart.MultipartFile document,
javax.servlet.http.HttpServletRequest request)
throws SearchException
SearchException@RequestMapping(value="/update-file",
method=POST)
@ResponseBody
public String updateFile(@RequestParam(value="indexId",required=false)
String indexId,
@RequestPart(value="site")
String site,
@RequestPart(value="id")
String id,
@RequestPart(value="document")
org.springframework.web.multipart.MultipartFile file,
javax.servlet.http.HttpServletRequest request)
throws SearchException
SearchException@ExceptionHandler(value=java.lang.Exception.class) public void handleException(Exception e, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
IOExceptionprotected Map<String,String> getAdditionalFields(javax.servlet.http.HttpServletRequest request)
Copyright © 2018 CrafterCMS. All rights reserved.