{"id":63690,"date":"2017-02-13T16:00:28","date_gmt":"2017-02-13T14:00:28","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=63690"},"modified":"2023-12-11T10:14:33","modified_gmt":"2023-12-11T08:14:33","slug":"elasticsearch-java-developers-introduction","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2017\/02\/elasticsearch-java-developers-introduction.html","title":{"rendered":"Elasticsearch for Java Developers: Introduction"},"content":{"rendered":"<p><em>This article is part of our Academy Course titled <a href=\"https:\/\/www.javacodegeeks.com\/2017\/04\/elasticsearch-tutorial-java-developers.html\">Elasticsearch Tutorial for Java Developers<\/a>.<\/p>\n<p>In this course, we provide a series of tutorials so that you can develop your own Elasticsearch based applications. We cover a wide range of topics, from installation and operations, to Java API Integration and reporting. With our straightforward tutorials, you will be able to get your own projects up and running in minimum time. Check it out <a href=\"https:\/\/www.javacodegeeks.com\/2017\/04\/elasticsearch-tutorial-java-developers.html\">here<\/a>!<\/em><\/p>\n<h2><a name=\"introduction\"><\/a>1. Introduction<\/h2>\n<p>Effective, fast and accurate search functionality is an integral part of vast majority of the modern applications and software platforms. Either you are running a small e-commerce web site and need to offer your customers a search over product catalogs, or you are a service provider and need to expose an API to let the developers filter over users and companies, or you are building any kind of messaging application where finding a conversation in the history is a must-have feature from day one \u2026 What is really important is that, delivering as relevant results as fast as possible could be yet another competitive advantage of the product or platform you are developing.<\/p>\n<div class=\"toc\">\n<h3>Table Of Contents<\/h3>\n<dl>\n<dt><a href=\"#introduction\">1. Introduction<\/a><\/dt>\n<dt><a href=\"#basics\">2. Elasticsearch Basics<\/a><\/dt>\n<dd>\n<dl>\n<dt><a href=\"#documents\">2.1. Documents<\/a><\/dt>\n<dt><a href=\"#indices\">2.2. Indices<\/a><\/dt>\n<dt><a href=\"#settings\">2.3. Index Settings<\/a><\/dt>\n<dt><a href=\"#mappings\">2.4. Mappings<\/a><\/dt>\n<dt><a href=\"#advanced\">2.5. Advanced Mappings<\/a><\/dt>\n<dt><a href=\"#indexing\">2.6. Indexing<\/a><\/dt>\n<dt><a href=\"#i18n\">2.7. Internalization (i18n)<\/a><\/dt>\n<\/dl>\n<\/dd>\n<dt><a href=\"#running\">3. Running Elasticsearch<\/a><\/dt>\n<dd>\n<dl>\n<dt><a href=\"#standalone\">3.1. Standalone Instance<\/a><\/dt>\n<dt><a href=\"#clustering\">3.2. Clustering<\/a><\/dt>\n<dt><a href=\"#embedding\">3.3. Embedding Into Application<\/a><\/dt>\n<dt><a href=\"#container\">3.4. Running As Container<\/a><\/dt>\n<\/dl>\n<\/dd>\n<dt><a href=\"#fits\">4. Where Elasticsearch Fits<\/a><\/dt>\n<dt><a href=\"#conclusion\">5. Conclusion<\/a><\/dt>\n<dt><a href=\"#next\">6. What\u2019s next<\/a><\/dt>\n<\/dl>\n<\/div>\n<p>Indeed, the search could have many faces, purposes, goals and different scale. It could be as simple as looking by exact word match or as complex as trying to understand the intent and the contextual meaning of the words one\u2019s is looking for (<a href=\"https:\/\/en.wikipedia.org\/wiki\/Semantic_search\">semantic search<\/a> engines). In terms of scale, it could be as trivial as querying a single database table, or as complex as crunching over billions and billions of web pages in order to deliver the desired results. It is very interesting and flourishing area of research, with many algorithms and papers published over the years.<\/p>\n<p>In case you are a Java \/ JVM developer, you may have heard about <a href=\"http:\/\/lucene.apache.org\/\">Apache Lucene<\/a> project, a high-performance, full-featured indexing and search library. It is the first and the best in class choice to unleash the power of full-text search and embed it into your applications. Although it is a terrific library by all means, many developers have found <a href=\"http:\/\/lucene.apache.org\/\">Apache Lucene<\/a> too low-level and not easy to use. That is one of the reasons why two other great projects, <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> and <a href=\"http:\/\/lucene.apache.org\/solr\/\">Apache Solr<\/a>, have been born.<\/p>\n<p>In this tutorial, we are going to talk about <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a>, making an emphasis on development side of things rather than operational. We are going to learn the basics of <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a>, get familiarized with the terminology and discuss different ways to run it and communicate with it from within Java \/ JVM applications or command line. At the very end of the tutorial we are going to talk about <a href=\"https:\/\/www.elastic.co\/products\">Elastic Stack<\/a> to showcase the ecosystem around <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> and its amazing capabilities.<\/p>\n<p>If you are a junior or seasoned Java \/ JVM developer and interested in learning about <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a>, this tutorial is definitely for you.<\/p>\n<h2><a name=\"basics\"><\/a>2. Elasticsearch Basics<\/h2>\n<p>To get started, it would be great to answer the question: so, what is <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a>, how it can help me and why should I use it?<\/p>\n<blockquote>\n<p><em>Elasticsearch is a highly scalable open-source full-text search and analytics engine. It allows you to store, search, and analyze big volumes of data quickly and in near real time. It is generally used as the underlying engine\/technology that powers applications that have complex search features and requirements. \u2013 <\/em><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/getting-started.html\"><em>https:\/\/www.elastic.co\/<\/em><\/a><\/p>\n<\/blockquote>\n<p><a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> is built on top of <a href=\"http:\/\/lucene.apache.org\/\">Apache Lucene<\/a> but favors communication over <a href=\"https:\/\/en.wikipedia.org\/wiki\/Representational_state_transfer\">RESTful APIs<\/a> and advanced in-depth analytics features. The <a href=\"https:\/\/en.wikipedia.org\/wiki\/Representational_state_transfer\">RESTful<\/a> part makes <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> particularly easy to learn and use. As of the moment of this writing, the latest stable release branch of the <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> was <code>5.2<\/code>, with the latest released version being <code>5.2.0<\/code>. We should definitely give <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> guys the credit for keeping the pace of delivering new releases so often, <code>5.0.x \/ 5.1.x <\/code>branches are just a few months old \u2026.<\/p>\n<p>In perspective of <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a>, being <a href=\"https:\/\/en.wikipedia.org\/wiki\/Representational_state_transfer\">RESTful APIs<\/a> has another advantage: every single piece of data sent to or received from <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> is itself a human-readable <a href=\"http:\/\/www.json.org\/\">JSON<\/a> document (although this is not the only protocol <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> supports as we are going to see later on).<\/p>\n<p>To keep the discussion relevant and practical, we are going to pretend that we are developing the application to manage the catalog of books. The data model will include categories, authors, publisher, book details (like publishing date, ISBN, rating) and brief description.<\/p>\n<p><figure id=\"attachment_63819\" aria-describedby=\"caption-attachment-63819\" style=\"width: 564px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/02\/book-catalog-jcg-1.png\"><img decoding=\"async\" class=\"wp-image-63819 size-full\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/02\/book-catalog-jcg-1.png\" alt=\"Book Catalog\" width=\"564\" height=\"244\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/02\/book-catalog-jcg-1.png 564w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/02\/book-catalog-jcg-1-300x130.png 300w\" sizes=\"(max-width: 564px) 100vw, 564px\" \/><\/a><figcaption id=\"caption-attachment-63819\" class=\"wp-caption-text\">Book Catalog<\/figcaption><\/figure><\/p>\n<p>Let us see how we could leverage <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> to make our book catalog easily searchable but before that we need to get familiarized a bit with the terminology. Although in the next couple of sections we are going to go over most of the concepts behind <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a>, please do not hesitate to consult <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/getting-started.html\">Elasticsearch official documentation<\/a> any time.<\/p>\n<h3><a name=\"documents\"><\/a>2.1. Documents<\/h3>\n<p>To put it simply, in context of <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> document is just an arbitrary piece of data (usually, structured). It could be absolutely anything which makes sense to your applications (like users, logs, blog posts, articles, products, \u2026) but this is a basic unit of information which <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> could manipulate.<\/p>\n<h3><a name=\"indices\"><\/a>2.2. Indices<\/h3>\n<p><a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> stores documents inside indices and as such, an index is simply a collection of the documents. To be fair, persisting absolutely different kind of the documents in the same index would be somewhat convenient but quite difficult to work with so every index may have one or more types. The types group documents logically by defining a set of common properties (or fields) every document of such type should have. Types serve as a metadata about documents and are very useful for exploring the structure of the data and constructing meaningful queries and aggregations.<\/p>\n<h3><a name=\"settings\"><\/a>2.3. Index Settings<\/h3>\n<p>Each index in <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> could have specific settings associated with it at the time of its creation. The most important ones are number of shards and replication factor. Let us talk about that for a moment.<\/p>\n<p><a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> has been built from the ground up to operate over massive amount of indexed data which will very likely exceed the memory and\/or storage capabilities of a single physical (or virtual) machine instance. As such, <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> uses sharding as a mechanism to split the index into several smaller pieces, called shards, and distribute them among many nodes. Please notice, once set the number of shards could not be altered (although this is not entirely true anymore, the index could be <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.1\/indices-shrink-index.html\">shrunk into fewer shards<\/a>).<\/p>\n<p>Indeed, sharding solves a real problem but it is vulnerable to data loss issues due to individual node failures. To address this problem, <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> supports high availability by leveraging replication. In this case, depending on replication factor, <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> maintains one or more copies of each shard and makes sure that each shard\u2019s replica is placed on different node.<\/p>\n<h3><a name=\"mappings\"><\/a>2.4. Mappings<\/h3>\n<p>The process of defining the type of the documents and assigning it to a particular index is called index mapping, mapping type or just a mapping. Coming up with a proper type mapping is, probably, one of the most important design exercises you would have to make in order to get most out of <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a>. Let us take some time and talk about mappings in details.<\/p>\n<p>Each mapping consists of optional meta-fields (they usually start from the underscore <code>\u2018_\u2019<\/code> character like <code>_index<\/code>, <code>_id<\/code>, <code>_parent<\/code>) and regular document fields (or properties). Each field (or property) has a <strong>data<\/strong> <strong>type<\/strong>, which in <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> could fall into one of those categories:<\/p>\n<ul>\n<li>Simple data types\n<ul>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/text.html\">text<\/a> &#8211; indexes full-text values<\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/keyword.html\">keyword<\/a> \u2013 indexes structured values<\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/date.html\">date<\/a> \u2013 indexes date\/time values<\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/number.html\">long<\/a> &#8211; indexes signed 64-bit integer values<\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/number.html\">integer<\/a> \u2013 indexes signed 32-bit integer values<\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/number.html\">short<\/a> &#8211; indexes signed 16-bit integer values<\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/number.html\">byte<\/a> \u2013 indexes signed 8-bit integer values<\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/number.html\">double<\/a> &#8211; indexes double-precision 64-bit IEEE 754 floating point values<\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/number.html\">float<\/a> &#8211; indexes single-precision 32-bit IEEE 754 floating point values<\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/number.html\">half_float<\/a> &#8211; indexes half-precision 16-bit IEEE 754 floating point values<\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/number.html\">scaled_float<\/a> &#8211; indexes floating point values that is backed by a <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/number.html\">long<\/a> and a fixed scaling factor<\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/boolean.html\">boolean<\/a> \u2013 indexes boolean values (for example, <strong>true\/false<\/strong>, <strong>on\/off<\/strong>, <strong>yes\/no<\/strong>, <strong>1\/0<\/strong>)<\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/ip.html\">ip<\/a> &#8211; indexes either <a href=\"https:\/\/en.wikipedia.org\/wiki\/IPv4\">IPv4<\/a> or <a href=\"https:\/\/en.wikipedia.org\/wiki\/IPv6\">IPv6<\/a> address values<\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.2\/binary.html\">binary<\/a> &#8211; indexes any binary value encoded as a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Base64\">Base64<\/a> string<\/li>\n<\/ul>\n<\/li>\n<li>Composite data types\n<ul>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/object.html\">object<\/a> \u2013 indexes inner objects which, in turn, may contain inner objects themselves<\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/nested.html\">nested<\/a> \u2013 a specialized version of the <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/object.html\">object<\/a> data type that allows to index arrays of objects independently of each other<\/li>\n<\/ul>\n<\/li>\n<li>Specialized data type\n<ul>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/geo-point.html\">geo_point<\/a> \u2013 indexes latitude-longitude pairs<\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/geo-shape.html\">geo_shape<\/a> &#8211; indexes an arbitrary geo shapes (such as rectangles and polygons)<\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/search-suggesters-completion.html\">completion<\/a> \u2013 dedicated data type to back auto-complete\/search-as-you-type functionality<\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.2\/token-count.html\">token_count<\/a> &#8211; dedicated data type to count the number of tokens in a string<\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.2\/percolator.html\">percolator<\/a> \u2013 specialized data type to store the query which is going to be used by <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.2\/query-dsl-percolate-query.html\">percolate query<\/a> to match the documents<\/li>\n<\/ul>\n<\/li>\n<li>Range data types:\n<ul>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.2\/range.html\">integer_range<\/a> \u2013 indexes a range of signed 32-bit integers<\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.2\/range.html\">float_range<\/a> \u2013 indexes a range of single-precision 32-bit IEEE 754 floating point values<\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.2\/range.html\">long_range<\/a> &#8211; indexes a range of signed 64-bit integers<\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.2\/range.html\">double_range<\/a> &#8211; indexes a range of double-precision 64-bit IEEE 754 floating point values<\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.2\/range.html\">date_range<\/a> &#8211; indexes a range of date values represented as unsigned 64-bit integer milliseconds elapsed since system epoch<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Cannot stress it enough, choosing the proper data type for the fields (properties) of your documents is a key for fast, effective search which delivers really relevant results. There is one catch though: the fields in each mapping type are not entirely independent of each other. The fields with the <strong>same name<\/strong> and within the <strong>same index<\/strong> but in <strong>different mapping types<\/strong> <strong>must have the same mapping definition<\/strong>. The reason is that internally those fields are mapped to the <strong>same field<\/strong>.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>Getting back to our application data model, let us try to define the simplest mapping type for <code>books<\/code> collections, utilizing our just acquired knowledge about data types.<\/p>\n<p><figure id=\"attachment_63820\" aria-describedby=\"caption-attachment-63820\" style=\"width: 464px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/02\/book-catalog-mapping-attempt-0-jcg.png\"><img decoding=\"async\" class=\"wp-image-63820 size-full\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/02\/book-catalog-mapping-attempt-0-jcg.png\" alt=\"Mapping Book Catalog: first attempt\" width=\"464\" height=\"244\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/02\/book-catalog-mapping-attempt-0-jcg.png 464w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/02\/book-catalog-mapping-attempt-0-jcg-300x158.png 300w\" sizes=\"(max-width: 464px) 100vw, 464px\" \/><\/a><figcaption id=\"caption-attachment-63820\" class=\"wp-caption-text\">Mapping Book Catalog: first attempt<\/figcaption><\/figure><\/p>\n<p>For most of the book properties the mapping data types are pretty straightforward but what about <strong>authors<\/strong> and <code>categories<\/code>? Those properties essentially contain the collection of values for which <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> has no direct data type yet, &#8230; or has it?<\/p>\n<h3><a name=\"advanced\"><\/a>2.5. Advanced Mappings<\/h3>\n<p>Interestingly, indeed <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> has no dedicated array or collection type but by default, any field may contain zero or more values (of its data type).<\/p>\n<p>In case of complex data structures, <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> supports mapping using <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/object.html\">object<\/a> and <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/nested.html\">nested<\/a> data types as well as establishing <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/mapping-parent-field.html\">parent\/child<\/a> relationships between documents within the same index. There are pros and cons of each approach but in order to learn how to use those techniques let us store <code>categories<\/code> as nested property of the <code>books<\/code> mapping type, while <code>authors<\/code> are going to be represented as a dedicated mapping which refers to <code>books<\/code> as parent.<\/p>\n<p><figure id=\"attachment_63821\" aria-describedby=\"caption-attachment-63821\" style=\"width: 841px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/02\/book-catalog-mapping-attempt-1-jcg-1.png\"><img decoding=\"async\" class=\"wp-image-63821 size-full\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/02\/book-catalog-mapping-attempt-1-jcg-1.png\" alt=\"Mapping Book Catalog: second (and the last) attempt\" width=\"841\" height=\"370\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/02\/book-catalog-mapping-attempt-1-jcg-1.png 841w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/02\/book-catalog-mapping-attempt-1-jcg-1-300x132.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/02\/book-catalog-mapping-attempt-1-jcg-1-768x338.png 768w\" sizes=\"(max-width: 841px) 100vw, 841px\" \/><\/a><figcaption id=\"caption-attachment-63821\" class=\"wp-caption-text\">Mapping Book Catalog: second (and the last) attempt<\/figcaption><\/figure><\/p>\n<p>These are our close to final mapping types for the <code>catalog<\/code> index. As we already know, <a href=\"http:\/\/www.json.org\/\">JSON<\/a> is a first class citizen in <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a>, so let us get a feeling of how the typical index mapping looks like in the format <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> actually understands.<\/p>\n<pre class=\"brush:bash\">{\n  \"mappings\": {\n    \"books\": {\n      \"_source\" : {\n        \"enabled\": true\n      },\n      \"properties\": {\n        \"title\": { \"type\": \"text\" },\n        \"categories\" : {\n          \"type\": \"nested\",\n          \"properties\" : {\n            \"name\": { \"type\": \"text\" }\n          }\n        },\n        \"publisher\": { \"type\": \"keyword\" },\n        \"description\": { \"type\": \"text\" },\n        \"published_date\": { \"type\": \"date\" },\n        \"isbn\": { \"type\": \"keyword\" },\n        \"rating\": { \"type\": \"byte\" }\n       }\n   },\n   \"authors\": {\n     \"properties\": {\n       \"first_name\": { \"type\": \"keyword\" },\n       \"last_name\": { \"type\": \"keyword\" }\n     },\n     \"_parent\": {\n        \"type\": \"books\"\n      }\n    }\n  }\n}\n<\/pre>\n<p>You may be surprised but explicit definition of the fields and mapping types could be omitted. <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> supports <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/dynamic-mapping.html\">dynamic mapping<\/a> thereby new mapping types and new field names will be added automatically when document is indexed (in this case <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> makes a decision what the field data types should be).<\/p>\n<p>Another important detail to mention is that each mapping type can have <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.2\/mapping-meta-field.html\">custom metadata associated<\/a> with it by using special <code>_meta<\/code> property. It is exceptionally useful technique which will be used by us later on in the tutorial.<\/p>\n<h3><a name=\"indexing\"><\/a>2.6. Indexing<\/h3>\n<p>Once <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> has all your indices and their mapping types defined (or inferred using <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/dynamic-mapping.html\">dynamic mapping<\/a>), it is ready to analyze and index the documents. It is quite complex but <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/analysis.html\">interesting process<\/a> which involves at least <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/analysis-analyzers.html\">analyzers<\/a>, <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/analysis-tokenizers.html\">tokenizers<\/a>, <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/analysis-tokenfilters.html\">token filters<\/a> and <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/analysis-charfilters.html\">character filters<\/a>.<\/p>\n<p><a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> supports quite a rich number of <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/mapping-params.html\">mapping parameters<\/a> which let you tailor the indexing, analysis and search phases precisely to your needs. For example, every single field (or property) could be configured to use own <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/analyzer.html\">index-time<\/a> and <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/search-analyzer.html\">search-time analyzers<\/a>, support <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/analysis-synonym-tokenfilter.html\">synonyms<\/a>, apply <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/analysis-stemmer-tokenfilter.html\">stemming<\/a>, filter out <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/analysis-stop-tokenfilter.html\">stop words<\/a> and much, much more. By carefully crafting these parameters you may end up with superior search capabilities, however the opposite also holds true, having them loose, and a lot of irrelevant and noisy results may be returned every time.<\/p>\n<p>If you don\u2019t need all that, you are good to go with the defaults as we have done in the previous section, omitting the parameters altogether. However, it is rarely the case. To give a realistic example, most of the time our applications have to support multiple languages (and locales). Luckily, <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> shines here as well.<\/p>\n<p>Before we move on to the next topic, there is an important constraint you have to be aware of. Once the mapping types are configured, in majority of cases <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.1\/mapping.html#_updating_existing_mappings\">they cannot be updated<\/a> as it automatically assumes that all the documents in the corresponding collections are not up to date anymore and should be re-indexed.<\/p>\n<h3><a name=\"i18n\"><\/a>2.7. Internalization (i18n)<\/h3>\n<p>The process of indexing and analyzing the documents is very sensitive to the native language of the document. By default, <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> uses <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/analysis-standard-analyzer.html\">standard analyzer<\/a> if none is specified in the mapping types. It works well for most of the languages but <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> supplies the <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/analysis-lang-analyzer.html\">dedicated analyzers<\/a> for Arabic, Armenian, Basque, Brazilian, Bulgarian, Czech, Danish, Dutch, English, Finnish, French, German, Greek, Hindi, Hungarian, Indonesian, Irish, Italian, Latvian, Lithuanian, Norwegian, Persian, Portuguese, Romanian, Russian, Spanish, Swedish, Turkish, Thai and <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/analysis-lang-analyzer.html\">a few more<\/a>.<\/p>\n<p>There are couple of ways to approach the indexing of the same document in multiple languages, depending on your data model and business case. For example, if document instances physically exist (translated) in multiple languages, than it probably makes sense to have one index per language.<\/p>\n<p>In case when documents are partially translated, <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> has another interesting option hidden in the sleeves called <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.1\/mapping-types.html#_multi_fields\">multi-fields<\/a>. <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.1\/mapping-types.html#_multi_fields\">Multi-fields<\/a> allow indexing the same document field (property) in different ways to be used for different purposes (like, for example, supporting multiple languages). Getting back to our <code>books<\/code> mapping type, we may have defined the <code>title<\/code> property as a <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.1\/mapping-types.html#_multi_fields\">multi-field<\/a> one, for example:<\/p>\n<pre class=\"brush:bash\">\"title\": {\n  \"type\": \"text\",\n  \"fields\": {\n    \"en\": { \"type\": \"text\", \"analyzer\": \"english\" },\n    \"fr\": { \"type\": \"text\", \"analyzer\": \"french\" },\n    \"de\": { \"type\": \"text\", \"analyzer\": \"german\" },\n    ...\n  }\n}<\/pre>\n<p>Those are not the only options available but they illustrate well enough the flexibility and maturity of the <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> in fulfilling quite sophisticated demands.<\/p>\n<h2><a name=\"running\"><\/a>3. Running Elasticsearch<\/h2>\n<p><a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> embraces simplicity in many ways and one of those is exceptionally easy way to get started on mostly any platform in just two steps: <a href=\"https:\/\/www.elastic.co\/downloads\/elasticsearch\">download and run<\/a>. In the next couple of sections we are going to talk about quite a few different ways to get your <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> up and running.<\/p>\n<h3><a name=\"standalone\"><\/a>3.1. Standalone Instance<\/h3>\n<p>Running <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> as a standalone application (or instance) is the fastest and simplest route to take. Just <a href=\"https:\/\/www.elastic.co\/downloads\/elasticsearch\">download the package<\/a> of your choice and run the shell script on <strong>Linux\/Unix\/Mac<\/strong> operating systems:<\/p>\n<pre class=\"brush:bash\">bin\/elasticsearch\n<\/pre>\n<p>Or from the batch file on <strong>Windows<\/strong> operating system:<\/p>\n<pre class=\"brush:bash\">bin\\elasticsearch.bat<\/pre>\n<p>And that is it, pretty straightforward, isn\u2019t it? However, before we go ahead and talk about more advanced options, it would be useful to get a taste what it actually means to run an instance of <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a>. To be more precise, every time we say we are starting the instance of <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a>, we are actually starting an instance of a <code>node<\/code>. As such, depending on provided configuration (by default, it is stored in <code>conf\/elastisearch.yml<\/code> file) there are <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.2\/modules-node.html\">multiple node types<\/a> which <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> supports at the moment. In this regards, every running standalone instance of <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> could be configured to run as one (or combination) of those node types:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.2\/modules-node.html#data-node\">data node<\/a>: these kind of nodes are maintaining the data and performing operations over this data (it is controlled by <code>node.data<\/code> configuration setting which is set to <code>true<\/code> by default)<\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.2\/ingest.html\">ingest node<\/a>: these are special kind of nodes which are able to apply an <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.2\/pipeline.html\">ingest pipeline<\/a> in order to transform and enrich the document before indexing it (it is controlled by <code>node.ingest<\/code> configuration setting which is set to <code>true<\/code> by default)<\/li>\n<\/ul>\n<p>Please take a note that this is not an exhaustive list of node types yet, we are going to learn quite a few more in just a moment.<br \/>\n[ulp id=&#8217;lFK4fMZhpULqeQUl&#8217;]<br \/>\n&nbsp;<\/p>\n<h3><a name=\"clustering\"><\/a>3.2. Clustering<\/h3>\n<p>Running <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> as a standalone instance is good for development, learning or testing purposes but certainly is not an option for production systems. Generally, in most real-world deployments <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> is configured to run in a <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.2\/_basic_concepts.html#_cluster\">cluster<\/a>: a collection of one or more nodes preferably split across multiple physical instances. <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> cluster manages all the data and also provides federated indexing, aggregations and search capabilities across all its nodes.<\/p>\n<p>Every <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> cluster is identified by a unique name which is controlled by <code>cluster.name<\/code> configuration setting (set to <code>\"elasticsearch\"<\/code> by default). The nodes are joining the cluster by referring to its name so it is quite important piece of configuration. Last but not least, each cluster has a dedicated master node which is responsible for performing cluster-wide actions and operations.<\/p>\n<p>Specifically applicable to the <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.2\/_basic_concepts.html#_cluster\">clustered<\/a> configuration, <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> supports a couple of more node types, in addition to the ones we already know about:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.2\/modules-node.html#master-node\">master-eligible node<\/a>: these kind of nodes are marked as eligible to be <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.2\/modules-discovery-zen.html\">elected as the master node<\/a> (it is controlled by <code>node.master<\/code> configuration setting which is set to <code>true<\/code> by default)<\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.2\/modules-node.html#coordinating-only-node\">coordinating-only node<\/a>: these are special kind of nodes which are able to only route requests, handle some search phases, and distribute bulk indexing, essentially behaving as load balancers (the node automatically becomes coordinating-only when <code>node.master<\/code>, <code>node.data<\/code> and <code>node.ingest<\/code> settings are all set to <code>false<\/code>)<\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.2\/modules-tribe.html\">tribe node<\/a>: these are special kind of <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.2\/modules-node.html#coordinating-only-node\">coordinating-only nodes<\/a> that can connect to multiple clusters and execute search or other operations across all of them (it is controlled by <code>tribe.*<\/code> configuration settings)<\/li>\n<\/ul>\n<p>By default, if configuration is not specified, each <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> node is configured to be <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.2\/modules-node.html#master-node\">master-eligible<\/a>, <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.2\/modules-node.html#data-node\">data node<\/a> and <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.2\/ingest.html\">ingest node<\/a>. Similarly to the standalone instance, <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> cluster instances could be started quickly from the command line:<\/p>\n<pre class=\"brush:bash\">bin\/elasticsearch -Ecluster.name=&lt;cluster-name&gt; -Enode.name=&lt;node-name&gt;\n<\/pre>\n<p>Or on Windows platform:<\/p>\n<pre class=\"brush:bash\">bin\\elasticsearch.bat -Ecluster.name=&lt;cluster-name&gt; -Enode.name=&lt;node-name&gt;<\/pre>\n<p>Along with sharding and replication, an <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> cluster has all the properties of a highly available and scalable system which will organically evolve to meet the needs of your applications. To be noted, despite <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/resiliency\/current\/index.html\">significant efforts<\/a> invested into stabilizing <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> clustering implementation and covering a lot of edge cases related to a different kind of failure scenarios, as of now <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> is still not recommended to serve as a system of record (or primary storage engine of your data).<\/p>\n<h3><a name=\"embedding\"><\/a>3.3. Embedding Into Application<\/h3>\n<p>Not a long time ago (right till <code>5.0<\/code> release branch) <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> fully supported the option to be run as part of the application, within the same JVM process (the technique commonly referred as embedding). Although it is certainly not a recommended practice, sometimes it was very useful and saves a lot of effort, for example during integration \/ system \/ component test runs.<\/p>\n<p>The situation has changed recently and <a href=\"https:\/\/www.elastic.co\/blog\/elasticsearch-the-server\">embedded version of the Elasticsearch<\/a> is not officially supported nor recommended anymore. Luckily, in case you really need the embedded instance, for example while slowly migrating from older <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> releases, <a href=\"http:\/\/stackoverflow.com\/questions\/22886083\/how-do-i-run-a-spring-boot-executable-jar-in-a-production-environment\">it is still possible<\/a>.<\/p>\n<pre class=\"brush:java\">@Configuration\npublic class ElasticsearchEmbeddedConfiguration {\n  private static class EmbeddedNode extends Node {\n    public EmbeddedNode(Settings preparedSettings) {\n      super(\n\t  InternalSettingsPreparer.prepareEnvironment(preparedSettings, null), \n\t  Collections.singletonList(Netty4Plugin.class)\n\t);\n    }\n  }\n\n  @Bean(initMethod = \"start\", destroyMethod = \"stop\")\n  Node elasticSearchTestNode() throws NodeValidationException, IOException {\n    return new EmbeddedNode(\n      Settings\n        .builder()\n        .put(NetworkModule.TRANSPORT_TYPE_KEY, \"netty4\")\n        .put(NetworkModule.HTTP_TYPE_KEY, \"netty4\")\n        .put(NetworkModule.HTTP_ENABLED.getKey(), \"true\")              \n        .put(Environment.PATH_HOME_SETTING.getKey(), home().getAbsolutePath())\n        .put(Environment.PATH_DATA_SETTING.getKey(), data().getAbsolutePath())\n        .build());\n  }\n\n  @Bean\n  File home() throws IOException {\n    return Files.createTempDirectory(\"elasticsearch-home-\").toFile();\n  }\n\n  @Bean\n  File data() throws IOException {\n    return Files.createTempDirectory(\"elasticsearch-data-\").toFile();\n  }\n\t\n  @PreDestroy\n  void destroy() throws IOException {\n    FileSystemUtils.deleteRecursively(home());\n    FileSystemUtils.deleteRecursively(data());\n  }\n}<\/pre>\n<p>Although this code snippet is based on the terrific <a href=\"https:\/\/projects.spring.io\/spring-framework\/\">Spring Framework<\/a>, the idea is pretty simple and could be used in any JVM-based application. With that being said, be warned though and reconsider the long-term solution without the need to embed <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a>.<\/p>\n<h3><a name=\"container\"><\/a>3.4. Running As Container<\/h3>\n<p>The rise of such tools as <a href=\"https:\/\/www.docker.com\/\">Docker<\/a>, <a href=\"https:\/\/coreos.com\/\">CoreOS<\/a> and tremendous popularization of the containers and container-based deployments significantly changed our thinking about infrastructure and, in many cases, the development approaches as well.<\/p>\n<p>To say it in other words, there is no need to download <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> and run it using the shell scripts or batch files. Everything is the container and could be pulled, configured and run using the single <code>docker<\/code> command (thankfully, there is an official <a href=\"https:\/\/hub.docker.com\/_\/elasticsearch\/\">Elasticseach Dockerhub repository<\/a>).<\/p>\n<p>Assuming you have <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> installed on your machine, let us run the single <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> instance relying on the default configuration:<\/p>\n<pre class=\"brush:bash\">docker run -d -p 9200:9200 -p 9300:9300 elasticsearch:5.2.0\n<\/pre>\n<p>Spinning an <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> cluster is a little bit more complicated but certainly much easier than doing that manually using shell scripts. By and large, <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> cluster needs multicast support in order for nodes to auto-discover each other, but with <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> you would need to fall back to <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.2\/modules-discovery-zen.html\">unicast discovery<\/a> unfortunately (unless you have <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/docker.html\">subscription to unlock commercial features<\/a>).<\/p>\n<pre class=\"brush:bash\">docker run -d -p 9200:9200 -p 9300:9300 --name es1 elasticsearch:5.2.0 -E cluster.name=es-catalog -E node.name=es1 -E transport.host=0.0.0.0\n<\/pre>\n<pre class=\"brush:bash\">docker run -d --name es2 --link=es1 elasticsearch:5.2.0 -E cluster.name=es-catalog -E node.name=es2 -E transport.host=0.0.0.0 -E discovery.zen.ping.unicast.hosts=es1\n<\/pre>\n<pre class=\"brush:bash\">docker run -d --name es3 --link=es1 elasticsearch:5.2.0 -E cluster.name=es-catalog -E node.name=es3 -E transport.host=0.0.0.0 -E discovery.zen.ping.unicast.hosts=es1<\/pre>\n<p>Once the containers are started, the cluster of three <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> nodes should be created, with master node accessible at <code>http:\/\/localhost:9200<\/code> (in case of native <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> support). If for some reasons you are still on <a href=\"https:\/\/docs.docker.com\/machine\/\">Docker Machine<\/a> (or even older <a href=\"http:\/\/boot2docker.io\/\">boot2docker<\/a>), the master node will be exposed at <code>http:\/\/&lt;docker-machine-ip&gt;:9200<\/code> respectively.<\/p>\n<p>If you are actively using <a href=\"https:\/\/docs.docker.com\/compose\/\">Docker Compose<\/a>, there are certain limitations which will complicate your life at this point. At the moment <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> images need some arguments to be passed to the entry point (everything you see at the end of the command line as <code>-E<\/code> option) however such feature is not supported by <a href=\"https:\/\/docs.docker.com\/compose\/\">Docker Compose<\/a> yet (although you may build your own images as a workaround).<\/p>\n<p>Along this tutorial we are going to use only <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> started as <a href=\"https:\/\/www.docker.com\/\">Docker<\/a> containers, hopefully this is something you have already adopted a long time ago.<\/p>\n<h2><a name=\"fits\"><\/a>4. Where Elasticsearch Fits<\/h2>\n<p>Search is one of the key features of the <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> and it does that exceptionally well. But <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> goes well beyond just search and provides a rich analytics capabilities shaped as <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.2\/search-aggregations.html\">aggregations framework<\/a> which does data aggregations based on a search query. In case you would need to do some analytics around your data, <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> is a great fit here as well.<\/p>\n<p>Although it may be not immediately apparent, <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> could be used to <a href=\"https:\/\/www.elastic.co\/blog\/elasticsearch-as-a-time-series-data-store\">manage time series data<\/a> (for example, metrics, stock prices) and even <a href=\"https:\/\/www.elastic.co\/blog\/found-getting-started-with-lire-and-elasticsearch\">back search for images<\/a>. One of the misconceptions about <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> is that it could be used as a data store. In some extent it is true, it does store the data however <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/resiliency\/current\/index.html\">it does not provide<\/a> the same guarantees yet you would expect from the typical data store.<\/p>\n<h2><a name=\"conclusion\"><\/a>5. Conclusion<\/h2>\n<p>Although we have talked about many things here, tons of interesting details and useful features of the <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> have not been covered at all yet. Our focus was kept on development side of things, and as such, the emphasis has been made on understanding the basics of <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a> and starting off quickly. Hopefully, you are already thrilled and excited enough to start reading the <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/5.2\/index.html\">official documentation reference<\/a> right away as more interesting topics are on the way.<\/p>\n<h2><a name=\"next\"><\/a>6. What\u2019s next<\/h2>\n<p><a href=\"https:\/\/www.javacodegeeks.com\/2017\/02\/elasticsearch-java-developers-elasticsearch-command-line.html\">In the next section<\/a> we are going to jump right from the discussions into the actions by exploring and playing with the myriads of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Representational_state_transfer\">RESTful APIs<\/a> exposed by <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a>, armed only with command line and the brilliant <a href=\"https:\/\/curl.haxx.se\/\">curl<\/a> \/ <a href=\"https:\/\/httpie.org\/\">http<\/a> tools.<\/p>\n<p>The source code for this post <a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/02\/elasticsearch-embedded.zip\">is available here<\/a> for download.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article is part of our Academy Course titled Elasticsearch Tutorial for Java Developers. In this course, we provide a series of tutorials so that you can develop your own Elasticsearch based applications. We cover a wide range of topics, from installation and operations, to Java API Integration and reporting. With our straightforward tutorials, you &hellip;<\/p>\n","protected":false},"author":141,"featured_media":65382,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[732],"class_list":["post-63690","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-core-java","tag-elasticsearch"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Elasticsearch for Java Developers: Introduction - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"This article is part of our Academy Course titled Elasticsearch Tutorial for Java Developers. In this course, we provide a series of tutorials so that you\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2017\/02\/elasticsearch-java-developers-introduction.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Elasticsearch for Java Developers: Introduction - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"This article is part of our Academy Course titled Elasticsearch Tutorial for Java Developers. In this course, we provide a series of tutorials so that you\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2017\/02\/elasticsearch-java-developers-introduction.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2017-02-13T14:00:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-11T08:14:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/04\/elastic-logo.png\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Andrey Redko\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andrey Redko\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"17 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/02\\\/elasticsearch-java-developers-introduction.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/02\\\/elasticsearch-java-developers-introduction.html\"},\"author\":{\"name\":\"Andrey Redko\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/771a6504862edc45322776832cbce413\"},\"headline\":\"Elasticsearch for Java Developers: Introduction\",\"datePublished\":\"2017-02-13T14:00:28+00:00\",\"dateModified\":\"2023-12-11T08:14:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/02\\\/elasticsearch-java-developers-introduction.html\"},\"wordCount\":3785,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/02\\\/elasticsearch-java-developers-introduction.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2017\\\/04\\\/elastic-logo.png\",\"keywords\":[\"Elasticsearch\"],\"articleSection\":[\"Core Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/02\\\/elasticsearch-java-developers-introduction.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/02\\\/elasticsearch-java-developers-introduction.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/02\\\/elasticsearch-java-developers-introduction.html\",\"name\":\"Elasticsearch for Java Developers: Introduction - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/02\\\/elasticsearch-java-developers-introduction.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/02\\\/elasticsearch-java-developers-introduction.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2017\\\/04\\\/elastic-logo.png\",\"datePublished\":\"2017-02-13T14:00:28+00:00\",\"dateModified\":\"2023-12-11T08:14:33+00:00\",\"description\":\"This article is part of our Academy Course titled Elasticsearch Tutorial for Java Developers. In this course, we provide a series of tutorials so that you\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/02\\\/elasticsearch-java-developers-introduction.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/02\\\/elasticsearch-java-developers-introduction.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/02\\\/elasticsearch-java-developers-introduction.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2017\\\/04\\\/elastic-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2017\\\/04\\\/elastic-logo.png\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/02\\\/elasticsearch-java-developers-introduction.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Core Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/core-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Elasticsearch for Java Developers: Introduction\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/771a6504862edc45322776832cbce413\",\"name\":\"Andrey Redko\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/16419ce8394173028eddaeb992859862bab50cfcf74589fa9bb9a3dd8bb27518?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/16419ce8394173028eddaeb992859862bab50cfcf74589fa9bb9a3dd8bb27518?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/16419ce8394173028eddaeb992859862bab50cfcf74589fa9bb9a3dd8bb27518?s=96&d=mm&r=g\",\"caption\":\"Andrey Redko\"},\"description\":\"Andriy is a well-grounded software developer with more then 12 years of practical experience using Java\\\/EE, C#\\\/.NET, C++, Groovy, Ruby, functional programming (Scala), databases (MySQL, PostgreSQL, Oracle) and NoSQL solutions (MongoDB, Redis).\",\"sameAs\":[\"http:\\\/\\\/aredko.blogspot.com\\\/\",\"http:\\\/\\\/ca.linkedin.com\\\/in\\\/aredko\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/andrey-redko\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Elasticsearch for Java Developers: Introduction - Java Code Geeks","description":"This article is part of our Academy Course titled Elasticsearch Tutorial for Java Developers. In this course, we provide a series of tutorials so that you","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2017\/02\/elasticsearch-java-developers-introduction.html","og_locale":"en_US","og_type":"article","og_title":"Elasticsearch for Java Developers: Introduction - Java Code Geeks","og_description":"This article is part of our Academy Course titled Elasticsearch Tutorial for Java Developers. In this course, we provide a series of tutorials so that you","og_url":"https:\/\/www.javacodegeeks.com\/2017\/02\/elasticsearch-java-developers-introduction.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2017-02-13T14:00:28+00:00","article_modified_time":"2023-12-11T08:14:33+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/04\/elastic-logo.png","type":"image\/png"}],"author":"Andrey Redko","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Andrey Redko","Est. reading time":"17 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2017\/02\/elasticsearch-java-developers-introduction.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/02\/elasticsearch-java-developers-introduction.html"},"author":{"name":"Andrey Redko","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/771a6504862edc45322776832cbce413"},"headline":"Elasticsearch for Java Developers: Introduction","datePublished":"2017-02-13T14:00:28+00:00","dateModified":"2023-12-11T08:14:33+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/02\/elasticsearch-java-developers-introduction.html"},"wordCount":3785,"commentCount":1,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/02\/elasticsearch-java-developers-introduction.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/04\/elastic-logo.png","keywords":["Elasticsearch"],"articleSection":["Core Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2017\/02\/elasticsearch-java-developers-introduction.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2017\/02\/elasticsearch-java-developers-introduction.html","url":"https:\/\/www.javacodegeeks.com\/2017\/02\/elasticsearch-java-developers-introduction.html","name":"Elasticsearch for Java Developers: Introduction - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/02\/elasticsearch-java-developers-introduction.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/02\/elasticsearch-java-developers-introduction.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/04\/elastic-logo.png","datePublished":"2017-02-13T14:00:28+00:00","dateModified":"2023-12-11T08:14:33+00:00","description":"This article is part of our Academy Course titled Elasticsearch Tutorial for Java Developers. In this course, we provide a series of tutorials so that you","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/02\/elasticsearch-java-developers-introduction.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2017\/02\/elasticsearch-java-developers-introduction.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2017\/02\/elasticsearch-java-developers-introduction.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/04\/elastic-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/04\/elastic-logo.png","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2017\/02\/elasticsearch-java-developers-introduction.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Core Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/core-java"},{"@type":"ListItem","position":4,"name":"Elasticsearch for Java Developers: Introduction"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/771a6504862edc45322776832cbce413","name":"Andrey Redko","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/16419ce8394173028eddaeb992859862bab50cfcf74589fa9bb9a3dd8bb27518?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/16419ce8394173028eddaeb992859862bab50cfcf74589fa9bb9a3dd8bb27518?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/16419ce8394173028eddaeb992859862bab50cfcf74589fa9bb9a3dd8bb27518?s=96&d=mm&r=g","caption":"Andrey Redko"},"description":"Andriy is a well-grounded software developer with more then 12 years of practical experience using Java\/EE, C#\/.NET, C++, Groovy, Ruby, functional programming (Scala), databases (MySQL, PostgreSQL, Oracle) and NoSQL solutions (MongoDB, Redis).","sameAs":["http:\/\/aredko.blogspot.com\/","http:\/\/ca.linkedin.com\/in\/aredko"],"url":"https:\/\/www.javacodegeeks.com\/author\/andrey-redko"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/63690","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/141"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=63690"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/63690\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/65382"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=63690"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=63690"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=63690"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}