<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: How can I get the result of elastic search from java code?</title><link>https://answers.axonivy.com/questions/4288/how-can-i-get-the-result-of-elastic-search-from-java-code</link><description>&lt;p&gt;The example: My elastic search has a document template that has a filed ABC_, can I have a chance to get the value of this field via elastic search from java code?&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/4288/how-can-i-get-the-result-of-elastic-search-from-java-code" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 20 Dec 2019 02:52:54 -0500</lastBuildDate><item><title>Answer by Lukas Lieb</title><link>https://answers.axonivy.com/questions/4288/how-can-i-get-the-result-of-elastic-search-from-java-code/4294</link><description>&lt;p&gt;Hi &lt;/p&gt;
&lt;p&gt;The best way to do so is using our business data search api (described here: &lt;a href="https://developer.axonivy.com/doc/latest/designer-guide/data-modeling/business-data.html#search)."&gt;https://developer.axonivy.com/doc/latest/designer-guide/data-modeling/business-data.html#search).&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If this is not enough for you, elastic search provides an well documented rest api. Means you can do something like:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Client client = ClientBuilder.newClient();
try (Response response = client.target(url).request().get())
{
  if (response.getStatus() == 200)
  {
    response.readEntity(String.class));
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Kind regards &lt;/p&gt;
&lt;p&gt;Lukas&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lukas Lieb</dc:creator><pubDate>Fri, 20 Dec 2019 02:52:54 -0500</pubDate><guid>https://answers.axonivy.com/questions/4288/how-can-i-get-the-result-of-elastic-search-from-java-code/4294</guid></item><item><title>Comment by Lukas Lieb on ttlinh's question</title><link>https://answers.axonivy.com/questions/4288/how-can-i-get-the-result-of-elastic-search-from-java-code#4289</link><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Do you read your documentation for the usage of business data?
&lt;a href="https://developer.axonivy.com/doc/latest/designer-guide/data-modeling/business-data.html"&gt;https://developer.axonivy.com/doc/latest/designer-guide/data-modeling/business-data.html&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lukas Lieb</dc:creator><pubDate>Thu, 19 Dec 2019 02:56:34 -0500</pubDate><guid>https://answers.axonivy.com/questions/4288/how-can-i-get-the-result-of-elastic-search-from-java-code#4289</guid></item></channel></rss>