JestClient Get.Builder is failing though SearchBuilder works fine

109 Views Asked by At

JestClient is returning signature mismatch error while running the query using Get.Builder, though the other queries using SearchBuilder are working just fine.

This works:

SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
searchSourceBuilder.query(QueryBuilders.matchPhraseQuery("_id", id));
Search search = new SearchBuilder(searchSourceBuilder.toString(), "my_index", "default").create();
return jestClient.execute(search);

But NOT this:

return jestClient.execute(new Get.Builder("my_index", id)
            .setParameter("preference", "_primary").type("default").build()); 

Any thoughts?

1

There are 1 best solutions below

0
On

After updating aws-signing-request-interceptor version from 0.0.16 to 0.0.22 in pom.xml, the issue got resolved, but I'm not sure why Get.Builder only failing with 0.0.16 version (by the way I'm using elasticsearch dependency of version 5.5.2).

       <dependency>
        <groupId>vc.inreach.aws</groupId>
        <artifactId>aws-signing-request-interceptor</artifactId>
        <version>0.0.22</version>
       </dependency>