{"id":64669,"date":"2017-03-27T07:00:04","date_gmt":"2017-03-27T04:00:04","guid":{"rendered":"https:\/\/www.javacodegeeks.com\/?p=64669"},"modified":"2017-03-25T12:35:00","modified_gmt":"2017-03-25T10:35:00","slug":"index-data-relational-database-elasticsearch-1","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2017\/03\/index-data-relational-database-elasticsearch-1.html","title":{"rendered":"Index Data from a Relational Database into Elasticsearch \u2013 1"},"content":{"rendered":"<p>Elasticsearch provides powerful search capabilities with support for sharding and replication of the data. So we would want to index data available in our DB into Elasticsearch.<\/p>\n<p>There are multiple ways to index data into Elasticsearch:<\/p>\n<ol>\n<li>Use Logstash to setup source as DB and sink as Elasticsearch and use a filter if required to build JSON object.<\/li>\n<li>Use an external library <a href=\"https:\/\/github.com\/jprante\/elasticsearch-jdbc\">elasticsearch-jdbc<\/a>\u00a0which runs, in its own process, external to Elasticsearch instance. It makes use of the transport client and its bulk APIs to index data into Elasticsearch.<\/li>\n<\/ol>\n<p>In this article, we will look at the approach 2 i.e using an external library running as a separate process.<\/p>\n<p>We will use MySQL as the DB and use the sample database <em>world,<\/em>\u00a0which comes with MySQL, with the following tables:<\/p>\n<ul>\n<li>country<\/li>\n<li>city<\/li>\n<li>countrylanguage<\/li>\n<\/ul>\n<p><a href=\"https:\/\/github.com\/jprante\/elasticsearch-jdbc\">Elasticsearch-jdbc<\/a> library supports up to Elasticsearch 2.3.4 with the compatibility matrix available on their GitHub <a href=\"https:\/\/github.com\/jprante\/elasticsearch-jdbc\">page<\/a>. First, let us index the data without pre-defining the index structure in Elasticsearch (ES). If we don\u2019t provide the index structure, ES infers and builds one based on the data indexed. \u00a0But this will not be an ideal structure always.<\/p>\n<h2>Create an Empty Index<\/h2>\n<p>Make sure ES is running. If you are on windows, then navigate to the bin directory of ES and run elasticsearch.bat. If you are on Linux, then follow the instructions <a href=\"https:\/\/sanaulla.info\/2016\/08\/30\/installing-elasticsearch-on-linux\/\">here<\/a>.<\/p>\n<p>To create an empty index you have to issue a HTTP POST to &lt;es_url&gt;:&lt;port&gt;\/&lt;index_name&gt;. For example, using cURL:<\/p>\n<pre class=\"brush:java\">curl -X POST localhost:9200\/world<\/pre>\n<p>You can even use REST clients of your choice like Postman to invoke the ES REST APIs<\/p>\n<h2>Setting up the JDBC Importer<\/h2>\n<p>Download the e<strong>lasticsearch-jdbc\u00a0<\/strong>binary from <a href=\"http:\/\/xbib.org\/repository\/org\/xbib\/elasticsearch\/importer\/elasticsearch-jdbc\/2.3.4.0\/elasticsearch-jdbc-2.3.4.0-dist.zip\">here<\/a>\u00a0and extract it into a folder, let\u2019s call it ES_IMPORTER. There are already scripts available in ES_IMPORTER\/bin for working with MySQL and other DBs and we will place all the scripts related to the importing in the same folder.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p><strong>Note<\/strong>: If you are using Oracle DB, then you need to place the JDBC driver in the ES_IMPORTER\/lib folder. For other DBs like MySQL, PostgreSql\u00a0JDBC drivers are already available.<\/p>\n<p><strong>Another Note<\/strong>: elasticsearch-jdbc requires JDK 8<\/p>\n<p>We will create the following files (code available at the links) to run the importer:<\/p>\n<ul>\n<li><a href=\"https:\/\/gist.github.com\/sanaulla123\/01b45a9d37c0c7f0e15e6eeb65bf19f0\">world-importer.bat<\/a>\/<a href=\"https:\/\/gist.github.com\/sanaulla123\/15dba4d506bb094cf33fa11176f33bb7\" target=\"_blank\">world-importer.sh<\/a> \u2013 used for launching the importer<\/li>\n<li><a href=\"https:\/\/gist.github.com\/sanaulla123\/441320f2a0cf92c745f5ad09f80d3e46\">world-importer-config.json<\/a> \u2013 used for configuring the importer<\/li>\n<li><a href=\"https:\/\/gist.github.com\/sanaulla123\/98a56e65213925fd2572d36144949310\" target=\"_blank\">world.sql<\/a> \u2013 contains the SQL query to be executed to get the data for indexing.<\/li>\n<\/ul>\n<p>The JDBC connection string, the DB username and the password can be updated in the <em>world-importer-config.json<\/em>. Also, the ES port, the ES host name, the ES index name, the ES index type name can be updated in the same file.<\/p>\n<h2>Running the JDBC Importer<\/h2>\n<p>Before running the importer, open \u00a0the URL:\u00a0<strong><a href=\"http:\/\/localhost:9200\/world\" rel=\"nofollow\">http:\/\/localhost:9200\/world<\/a><\/strong><\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/03\/empty-index-structure.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-64680\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/03\/empty-index-structure.png\" alt=\"\" width=\"384\" height=\"333\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/03\/empty-index-structure.png 384w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/03\/empty-index-structure-300x260.png 300w\" sizes=\"(max-width: 384px) 100vw, 384px\" \/><\/a><\/p>\n<p>The above shows that the index world has no structure defined<\/p>\n<p>Open the URL:\u00a0<strong><a href=\"http:\/\/localhost:9200\/world\/_search\" rel=\"nofollow\">http:\/\/localhost:9200\/world\/_search<\/a><\/strong><\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/03\/empty-index-data.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-64681\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/03\/empty-index-data.png\" alt=\"\" width=\"219\" height=\"264\" \/><\/a><\/p>\n<p>The above shows that there is no data in the index world.<\/p>\n<p>Navigate to the directory: ES_IMPORTER\/bin and run <em>world-importer.bat <\/em>OR<em> world-importer.sh<\/em>.<\/p>\n<p>Once the importer completes, which should be almost immediately, open the URL:\u00a0<strong><a href=\"http:\/\/localhost:9200\/world\/\" rel=\"nofollow\">http:\/\/localhost:9200\/world\/<\/a><\/strong>. You will now see that the index has a structure, which is also called mappings, defined within the <em>mappings<\/em> key. And when you open the URL:\u00a0<strong><a href=\"http:\/\/localhost:9200\/world\/_search\" rel=\"nofollow\">http:\/\/localhost:9200\/world\/_search<\/a><\/strong> you will find the indexed data which would be around 239 entries as reported by the <em>hits<\/em> field.<\/p>\n<h2>Advantages of JDBC Importer<\/h2>\n<ul>\n<li>Easy to import data, a\u00a0lot of configuration options available. And can be scheduled to run repeatedly.<\/li>\n<li>Supports creating nested objects and arrays of nested objects (In our example\u00a0capital is a nested object and cities and languages are arrays of nested objects)<\/li>\n<li>SQL queries can be parameterized<\/li>\n<li>Only the data changed after the last run can be re-indexed.<\/li>\n<\/ul>\n<h2>Shortcomings of JDBC Importer<\/h2>\n<ul>\n<li>No support for ES version 5 and above<\/li>\n<li>There is a possibility of duplicate objects in the\u00a0array of nested objects. But de-duplication can be handled at the application layer.<\/li>\n<li>There can be a\u00a0possibility of delay in support for latest ES versions.<\/li>\n<\/ul>\n<p>In the next part of this article we will:<\/p>\n<ul>\n<li>Create the mappings for the index<\/li>\n<li>Understand the SQL used for indexing<img decoding=\"async\" src=\"https:\/\/pixel.wp.com\/b.gif?v=noscript\" \/><\/li>\n<\/ul>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"https:\/\/sanaulla.info\/2017\/03\/25\/index-data-from-a-relational-database-into-elasticsearch-1\/\">Index Data from a Relational Database into Elasticsearch \u2013 1<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/join-us\/jcg\/\">JCG partner<\/a> Mohamed Sanaulla at the <a href=\"http:\/\/sanaulla.info\">Experiences Unlimited<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Elasticsearch provides powerful search capabilities with support for sharding and replication of the data. So we would want to index data available in our DB into Elasticsearch. There are multiple ways to index data into Elasticsearch: Use Logstash to setup source as DB and sink as Elasticsearch and use a filter if required to build &hellip;<\/p>\n","protected":false},"author":24,"featured_media":112,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[732],"class_list":["post-64669","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-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>Index Data from a Relational Database into Elasticsearch \u2013 1 - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Elasticsearch provides powerful search capabilities with support for sharding and replication of the data. So we would want to index data available in our\" \/>\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\/03\/index-data-relational-database-elasticsearch-1.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Index Data from a Relational Database into Elasticsearch \u2013 1 - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Elasticsearch provides powerful search capabilities with support for sharding and replication of the data. So we would want to index data available in our\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2017\/03\/index-data-relational-database-elasticsearch-1.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-03-27T04:00:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg\" \/>\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\/jpeg\" \/>\n<meta name=\"author\" content=\"Mohamed Sanaulla\" \/>\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=\"Mohamed Sanaulla\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/03\\\/index-data-relational-database-elasticsearch-1.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/03\\\/index-data-relational-database-elasticsearch-1.html\"},\"author\":{\"name\":\"Mohamed Sanaulla\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/d27ef53124d64097c81168263af5a7f7\"},\"headline\":\"Index Data from a Relational Database into Elasticsearch \u2013 1\",\"datePublished\":\"2017-03-27T04:00:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/03\\\/index-data-relational-database-elasticsearch-1.html\"},\"wordCount\":725,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/03\\\/index-data-relational-database-elasticsearch-1.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"keywords\":[\"Elasticsearch\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/03\\\/index-data-relational-database-elasticsearch-1.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/03\\\/index-data-relational-database-elasticsearch-1.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/03\\\/index-data-relational-database-elasticsearch-1.html\",\"name\":\"Index Data from a Relational Database into Elasticsearch \u2013 1 - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/03\\\/index-data-relational-database-elasticsearch-1.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/03\\\/index-data-relational-database-elasticsearch-1.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"datePublished\":\"2017-03-27T04:00:04+00:00\",\"description\":\"Elasticsearch provides powerful search capabilities with support for sharding and replication of the data. So we would want to index data available in our\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/03\\\/index-data-relational-database-elasticsearch-1.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/03\\\/index-data-relational-database-elasticsearch-1.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/03\\\/index-data-relational-database-elasticsearch-1.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"java-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/03\\\/index-data-relational-database-elasticsearch-1.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\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Index Data from a Relational Database into Elasticsearch \u2013 1\"}]},{\"@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\\\/d27ef53124d64097c81168263af5a7f7\",\"name\":\"Mohamed Sanaulla\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/64131fe9e9472b8852abf595cbbf3a8a2a5e86569fa1349eed92b2a32f9104c1?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/64131fe9e9472b8852abf595cbbf3a8a2a5e86569fa1349eed92b2a32f9104c1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/64131fe9e9472b8852abf595cbbf3a8a2a5e86569fa1349eed92b2a32f9104c1?s=96&d=mm&r=g\",\"caption\":\"Mohamed Sanaulla\"},\"sameAs\":[\"http:\\\/\\\/blog.sanaulla.info\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Mohamed-Sanaulla\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Index Data from a Relational Database into Elasticsearch \u2013 1 - Java Code Geeks","description":"Elasticsearch provides powerful search capabilities with support for sharding and replication of the data. So we would want to index data available in our","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\/03\/index-data-relational-database-elasticsearch-1.html","og_locale":"en_US","og_type":"article","og_title":"Index Data from a Relational Database into Elasticsearch \u2013 1 - Java Code Geeks","og_description":"Elasticsearch provides powerful search capabilities with support for sharding and replication of the data. So we would want to index data available in our","og_url":"https:\/\/www.javacodegeeks.com\/2017\/03\/index-data-relational-database-elasticsearch-1.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2017-03-27T04:00:04+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","type":"image\/jpeg"}],"author":"Mohamed Sanaulla","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Mohamed Sanaulla","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2017\/03\/index-data-relational-database-elasticsearch-1.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/03\/index-data-relational-database-elasticsearch-1.html"},"author":{"name":"Mohamed Sanaulla","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/d27ef53124d64097c81168263af5a7f7"},"headline":"Index Data from a Relational Database into Elasticsearch \u2013 1","datePublished":"2017-03-27T04:00:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/03\/index-data-relational-database-elasticsearch-1.html"},"wordCount":725,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/03\/index-data-relational-database-elasticsearch-1.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","keywords":["Elasticsearch"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2017\/03\/index-data-relational-database-elasticsearch-1.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2017\/03\/index-data-relational-database-elasticsearch-1.html","url":"https:\/\/www.javacodegeeks.com\/2017\/03\/index-data-relational-database-elasticsearch-1.html","name":"Index Data from a Relational Database into Elasticsearch \u2013 1 - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/03\/index-data-relational-database-elasticsearch-1.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/03\/index-data-relational-database-elasticsearch-1.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","datePublished":"2017-03-27T04:00:04+00:00","description":"Elasticsearch provides powerful search capabilities with support for sharding and replication of the data. So we would want to index data available in our","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/03\/index-data-relational-database-elasticsearch-1.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2017\/03\/index-data-relational-database-elasticsearch-1.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2017\/03\/index-data-relational-database-elasticsearch-1.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","width":150,"height":150,"caption":"java-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2017\/03\/index-data-relational-database-elasticsearch-1.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":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Index Data from a Relational Database into Elasticsearch \u2013 1"}]},{"@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\/d27ef53124d64097c81168263af5a7f7","name":"Mohamed Sanaulla","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/64131fe9e9472b8852abf595cbbf3a8a2a5e86569fa1349eed92b2a32f9104c1?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/64131fe9e9472b8852abf595cbbf3a8a2a5e86569fa1349eed92b2a32f9104c1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/64131fe9e9472b8852abf595cbbf3a8a2a5e86569fa1349eed92b2a32f9104c1?s=96&d=mm&r=g","caption":"Mohamed Sanaulla"},"sameAs":["http:\/\/blog.sanaulla.info"],"url":"https:\/\/www.javacodegeeks.com\/author\/Mohamed-Sanaulla"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/64669","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\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=64669"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/64669\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/112"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=64669"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=64669"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=64669"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}