Build App search query for JAVA Low Level Rest Client in Spring Boot Application

Hi,

I am trying to use App Search v8.6 with Spring Boot application.
As per my understanding there is no query builder available for java(Please correct if my findings are wrong). I am using Low Level Rest Client with Request API call and written converter using JSONDeserializer to process response, its working for me with hardcoded query.

Now when it comes to query builder, i need some suggestion or direction on beow:

  • Should i use Elastic Search sql query translator and use generated json query in RestClient payload?(will this generated query work with App search API)
  • Can I use Elastic QueryBuilder to build query and use it in App search API?

Hi @Ketan_Jethva ,

Unfortunately you are correct, and there is no query builder in Java for the App Search REST API.

For the most part, App Search's APIs and Elasticsearch's APIs are distinct, so using the Elasticsearch query translator/builder will not work for you. The exception to this is the Elasticsearch Search passthrough API for App Search. However, you'd likely want to base those queries first off of an App Search Explain API response, or else you'll be losing out on a lot of App Search "special sauce."

While it's not as straightforward, I'd suggest just continuing to use the low-level Rest Client.

If you're a paying customer, you may also wish to reach out to your support contact and ask to file an Enhancement Request for a JVM client for App Search. We use Enhancement Requests to help inform our priorities for a roadmap.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.