package com.hp.autonomy.frontend.find.search;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/search/query-text-index")
public class DocumentsController {

    @Autowired
    private DocumentsService documentsService;

    @RequestMapping(value = "/text/{text}", method = RequestMethod.GET)
    @ResponseBody
    public List<Document> query(
        @PathVariable("text") final String text
    ) {
        return documentsService.queryTextIndex(text);
    }

}

@@ -157,69 +157,8 @@
 er;%0A
-import org.springframework.web.bind.annotation.PathVariable;%0A
 impo
@@ -278,16 +278,77 @@
 Method;%0A
+import org.springframework.web.bind.annotation.RequestParam;%0A
 import o
@@ -604,32 +604,8 @@
 ing(
-value = %22/text/%7Btext%7D%22, 
 meth
@@ -692,20 +692,20 @@
    @
-PathVariable
+RequestParam
 (%22te

Restructure request mapping