+ @RequestMapping(value = "/indexes/{index}/suggest",
+ method = RequestMethod.POST,
+ consumes = {"application/json"})
+ public ResponseEntity<String> processSuggestQuery(@RequestBody String requestBody, HttpServletRequest request,
+ @RequestHeader HttpHeaders headers, @PathVariable("index") String index) {
+ // Forward the request to our document API to query suggestions in the
+ // document.
+ DocumentApi documentApi = new DocumentApi(this);
+ return documentApi.processSuggestQueryWithPost(requestBody, request, headers, index,
+ documentStore);
+ }
+
+ @RequestMapping(value = "/indexes/dynamic/{index}",
+ method = RequestMethod.PUT,
+ consumes = {"application/json"})
+ public ResponseEntity<String> processCreateDynamicIndex(@RequestBody String requestBody,
+ HttpServletRequest request,
+ @RequestHeader HttpHeaders headers,
+ @PathVariable ("index") String index) {
+
+ // Forward the request to our index API to create the index.
+ IndexApi indexApi = new IndexApi(this);
+ return indexApi.processCreateDynamicIndex(requestBody, request, headers, index, documentStore);
+ }