Commit 676f3a11 authored by Chris Morris's avatar Chris Morris
Browse files

Replaced documents with final-project

parent 056614ef
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -101,8 +101,8 @@ public class MLRestController {

            for (MultipartFile uploadfile : uploadfiles)
            {
                 uri = "http://192.168.56.200:8000/LATEST/documents?uri=/final-project/" + uploadfile.getOriginalFilename(); // this works, but doesn't work for the right datahase
                //uri = "http://192.168.56.200:8000/LATEST/final-project?uri=/" + uploadfile.getOriginalFilename();           // provide the REST API URI
                 // uri = "http://192.168.56.200:8000/LATEST/documents?uri=/final-project/" + uploadfile.getOriginalFilename(); // this works, but doesn't work for the right datahase
                uri = "http://192.168.56.200:8000/LATEST/final-project?uri=/" + uploadfile.getOriginalFilename();           // provide the REST API URI
                // convert the MultipartFile into a file
                File file = new File(uploadfile.getName());          // provide the file object
                file.createNewFile();
@@ -136,7 +136,7 @@ public class MLRestController {
            Credentials credentials = new UsernamePasswordCredentials("admin", "admin");  // provide username & password
            provider.setCredentials(AuthScope.ANY, credentials);
            HttpClient httpClient = HttpClientBuilder.create().setDefaultCredentialsProvider(provider).build();
            String uri = "http://192.168.56.200:8000/LATEST/documents?uri=" + doc_uri;          // provide the REST API URI
            String uri = "http://192.168.56.200:8000/LATEST/final-project?uri=" + doc_uri;          // provide the REST API URI
            System.out.println("The URI for deleting the document is: " + uri);
            HttpDelete delete = new HttpDelete(uri);
            HttpResponse response = httpClient.execute(delete);
@@ -178,7 +178,7 @@ public class MLRestController {
            Credentials credentials = new UsernamePasswordCredentials("admin", "admin");  // provide username & password
            provider.setCredentials(AuthScope.ANY, credentials);
            HttpClient httpClient = HttpClientBuilder.create().setDefaultCredentialsProvider(provider).build();
            String uri = "http://192.168.56.200:8000/LATEST/search?q=" + cts_query_string;      // provide the REST API URI
            String uri = "http://192.168.56.200:8000/LATEST/search?structuredQuery=" + cts_query_string;      // provide the REST API URI
            URI my_uri = new URI(uri);
            HttpUriRequest request = RequestBuilder.get()
                    .setUri(my_uri)