Hi:
I ran into this problem wherein I was trying to verify if an index exists, by doing so :
JestClientFactory factory = new JestClientFactory();
factory.setHttpClientConfig(new HttpClientConfig.Builder("http://secure.server.es.instance")
.defaultCredentials("user-name","pass-word")
.multiThreaded(true)
.build());
JestClient restClient = factory.getObject();
JestResult jr = restClient.execute(new IndicesExists.Builder("qed").build());
boolean x = jr.isSucceeded();
the boolean result value x was true. However, I knew from looking at the es instance that the index "qed" did not exist.
I started to investigate and found out that if I create the JestClient without basic authentication and access an ES instance without any security enabled, It returned true/false depending on if an index exists or not.
If I enabled basic authentication and access an ES instance with security enabled, It always returns true
I also saw this error pop up when trying to use the Cat API:
Exception in thread "main" com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 16 column 12 path $
Hi: I ran into this problem wherein I was trying to verify if an index exists, by doing so :
the boolean result value x was true. However, I knew from looking at the es instance that the index "qed" did not exist. I started to investigate and found out that if I create the JestClient without basic authentication and access an ES instance without any security enabled, It returned true/false depending on if an index exists or not. If I enabled basic authentication and access an ES instance with security enabled, It always returns true I also saw this error pop up when trying to use the Cat API:
Exception in thread "main" com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 16 column 12 path $
I am running ES 2.1.1 with Jest 2.0.0