{"id":1205,"date":"2024-01-21T12:30:48","date_gmt":"2024-01-21T07:00:48","guid":{"rendered":"https:\/\/www.techandtrain.com\/blog\/?p=1205"},"modified":"2025-10-22T14:52:14","modified_gmt":"2025-10-22T09:22:14","slug":"how-do-i-fine-tune-my-elasticsearch-when-its-slow-chatgpt-bard-generated","status":"publish","type":"post","link":"https:\/\/www.techandtrain.com\/blog\/2024\/01\/how-do-i-fine-tune-my-elasticsearch-when-its-slow-chatgpt-bard-generated\/","title":{"rendered":"How do I fine tune my ElasticSearch when it&#8217;s slow &#8211; ChatGPT &amp; BARD generated"},"content":{"rendered":"\n<p id=\"ember3304\">ChatGPT &#8211; Fine-tuning an Elasticsearch cluster to address performance issues involves several steps. Elasticsearch is a powerful search and analytics engine, but it requires careful tuning to achieve optimal performance, especially in environments with large amounts of data or high query volumes. Here are some general guidelines to help you fine-tune your Elasticsearch cluster:<\/p>\n\n\n\n<p id=\"ember3305\">### 1. Assess Your Cluster&#8217;s Health and Configuration<\/p>\n\n\n\n<p id=\"ember3306\">&#8211; <strong>Check Cluster Health<\/strong>: Use the GET \/_cluster\/health API to check the cluster&#8217;s health status. Look for any red or yellow indicators.<\/p>\n\n\n\n<p id=\"ember3307\">&#8211; <strong>Review Configuration Files<\/strong>: Examine elasticsearch.yml for any misconfigurations or suboptimal settings.<\/p>\n\n\n\n<p id=\"ember3308\">### 2. Hardware and Resource Allocation<\/p>\n\n\n\n<p id=\"ember3309\">&#8211; <strong>Memory Allocation<\/strong>: Ensure that the heap size is properly set. Typically, it&#8217;s recommended to allocate no more than 50% of available memory to Elasticsearch.<\/p>\n\n\n\n<p id=\"ember3310\">&#8211; <strong>CPU and Memory Resources<\/strong>: Make sure your nodes have adequate CPU and memory resources.<\/p>\n\n\n\n<p id=\"ember3311\">&#8211; <strong>Disk I\/O and Type<\/strong>: Use SSDs for faster I\/O performance. Monitor disk I\/O usage to identify bottlenecks.<\/p>\n\n\n\n<p id=\"ember3312\">### 3. Index Management<\/p>\n\n\n\n<p id=\"ember3313\">&#8211; <strong>Shard Sizing and Count<\/strong>: Having too many or too few shards can affect performance. Adjust the number of shards per index based on data volume and usage.<\/p>\n\n\n\n<p id=\"ember3314\">&#8211; <strong>Index Mappings<\/strong>: Use appropriate mappings. Avoid using dynamic mappings for large clusters.<\/p>\n\n\n\n<p id=\"ember3315\">&#8211; <strong>Index Templates<\/strong>: Use index templates for consistent mappings.<\/p>\n\n\n\n<p id=\"ember3316\">### 4. Query Optimization<\/p>\n\n\n\n<p id=\"ember3317\">&#8211; <strong>Analyze Slow Queries<\/strong>: Use the Slow Log Query to identify and analyze slow queries.<\/p>\n\n\n\n<p id=\"ember3318\">&#8211; <strong>Optimize Query Structure<\/strong>: Simplify and optimize the structure of your queries.<\/p>\n\n\n\n<p id=\"ember3319\">### 5. Cluster Scaling<\/p>\n\n\n\n<p id=\"ember3320\">&#8211; <strong>Horizontal Scaling<\/strong>: Add more nodes to the cluster if the current nodes are overloaded.<\/p>\n\n\n\n<p id=\"ember3321\">&#8211; <strong>Vertical Scaling<\/strong>: Increase the resources (CPU, RAM, storage) of the existing nodes.<\/p>\n\n\n\n<p id=\"ember3322\">### 6. Caching and Buffer Sizes<\/p>\n\n\n\n<p id=\"ember3323\">&#8211; <strong>Field Data Cache<\/strong>: Adjust the field data cache size if you&#8217;re using a lot of aggregations.<\/p>\n\n\n\n<p id=\"ember3324\">&#8211; <strong>Request and Query Cache<\/strong>: Fine-tune request and query caching settings to optimize performance.<\/p>\n\n\n\n<p id=\"ember3325\">### 7. Garbage Collection Tuning<\/p>\n\n\n\n<p id=\"ember3326\">&#8211; <strong>Monitor GC Performance<\/strong>: Use monitoring tools to watch for excessive garbage collection.<\/p>\n\n\n\n<p id=\"ember3327\">&#8211; <strong>Tune GC Settings<\/strong>: Adjust garbage collection settings if needed to reduce pause times.<\/p>\n\n\n\n<p id=\"ember3328\">### 8. Networking and Thread Pools<\/p>\n\n\n\n<p id=\"ember3329\">&#8211; <strong>Thread Pool Sizes<\/strong>: Customize thread pool sizes based on your cluster&#8217;s workload.<\/p>\n\n\n\n<p id=\"ember3330\">&#8211; <strong>Network Configuration<\/strong>: Ensure optimal network configuration and bandwidth.<\/p>\n\n\n\n<p id=\"ember3331\">### 9. Monitoring and Logging<\/p>\n\n\n\n<p id=\"ember3332\">&#8211; <strong>Enable Monitoring<\/strong>: Use Elasticsearch&#8217;s monitoring features or external tools to keep an eye on cluster performance and resource usage.<\/p>\n\n\n\n<p id=\"ember3333\">&#8211; <strong>Log Analysis<\/strong>: Regularly review logs for warnings or errors that could indicate problems.<\/p>\n\n\n\n<p id=\"ember3334\">### 10. Regular Maintenance<\/p>\n\n\n\n<p id=\"ember3335\">&#8211; <strong>Routine Checks<\/strong>: Regularly update your indices, perform health checks, and rebalance shards as necessary.<\/p>\n\n\n\n<p id=\"ember3336\">&#8211; <strong>Snapshot and Backup<\/strong>: Regularly backup your cluster&#8217;s data.<\/p>\n\n\n\n<p id=\"ember3337\">### Additional Tips<\/p>\n\n\n\n<p id=\"ember3338\">&#8211; <strong>Test Changes in a Staging Environment<\/strong>: Always test configuration changes in a non-production environment first.<\/p>\n\n\n\n<p id=\"ember3339\">&#8211; <strong>Stay Updated<\/strong>: Keep your Elasticsearch version up-to-date with the latest stable releases.<\/p>\n\n\n\n<p id=\"ember3340\">&#8211; <strong>Professional Assistance<\/strong>: Consider seeking help from Elasticsearch consultants or support for complex environments.<\/p>\n\n\n\n<p id=\"ember3341\">Remember, tuning Elasticsearch is often specific to your use case and data. It&#8217;s important to understand the nature of your data and queries when making adjustments. Regular monitoring and incremental changes are key to maintaining optimal performance.<\/p>\n\n\n\n<p id=\"ember3343\">BARD &#8211; <strong>Here are key steps to fine-tune your Elasticsearch cluster for performance:<\/strong><\/p>\n\n\n\n<p id=\"ember3344\"><strong>1. Identify the Bottleneck:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Analyze Cluster Metrics:<\/strong> Use _nodes\/stats, _cluster\/health, and _cluster\/stats APIs to collect information about CPU, memory, I\/O, and query performance.<\/li>\n\n\n\n<li><strong>Review Logs:<\/strong> Check for errors, warnings, or unusual patterns in Elasticsearch logs.<\/li>\n<\/ul>\n\n\n\n<p id=\"ember3346\"><strong>2. Optimize Hardware and Resources:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>CPU:<\/strong> Ensure sufficient processing power for your workload. Consider vertical scaling (more powerful nodes) or horizontal scaling (adding nodes).<\/li>\n\n\n\n<li><strong>Memory:<\/strong> <strong>Heap Size:<\/strong> Allocate enough memory for the JVM heap, typically 50% of available RAM. <strong>Filesystem Cache:<\/strong> Leave ample memory for the OS filesystem cache, around 40-50% of available RAM.<\/li>\n\n\n\n<li><strong>Storage:<\/strong> Use fast storage devices (SSDs) for better indexing and search performance.<\/li>\n<\/ul>\n\n\n\n<p id=\"ember3348\"><strong>3. Adjust Sharding and Replica Settings:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Shard Count:<\/strong> Balance the number of shards for optimal performance. Too many shards can lead to overhead, while too few can limit parallelism.<\/li>\n\n\n\n<li><strong>Replicas:<\/strong> Adjust replica count based on your availability and performance needs. More replicas can increase read performance but also consume more resources.<\/li>\n<\/ul>\n\n\n\n<p id=\"ember3350\"><strong>4. Optimize Indexing and Search:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Indexing:<\/strong> <strong>Bulk Requests:<\/strong> Use bulk requests to batch indexing operations for efficiency. <strong>Refresh Interval:<\/strong> Adjust the refresh interval to control how often new documents become searchable. <strong>Disable Replicas for Initial Loads:<\/strong> Temporarily disable replicas during bulk indexing to reduce overhead.<\/li>\n\n\n\n<li><strong>Search:<\/strong> <strong>Document Modeling:<\/strong> Optimize document structure and mappings for frequent search patterns. <strong>Query Optimization:<\/strong> Use filters, aggregations, and scoring strategically to minimize query complexity. <strong>Caching:<\/strong> Leverage caching mechanisms for frequently accessed data.<\/li>\n<\/ul>\n\n\n\n<p id=\"ember3352\"><strong>5. Monitor and Maintain:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Regular Monitoring:<\/strong> Track key performance metrics to identify issues early.<\/li>\n\n\n\n<li><strong>Warm Up Indices:<\/strong> Preload frequently queried data for faster response times.<\/li>\n\n\n\n<li><strong>Force Merge:<\/strong> Combine smaller segments into larger ones for efficient storage and retrieval.<\/li>\n<\/ul>\n\n\n\n<p id=\"ember3354\"><strong>Additional Considerations:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Node Separation:<\/strong> Separate master and data nodes for better resource allocation.<\/li>\n\n\n\n<li><strong>Cross-Cluster Replication:<\/strong> Use for high availability and disaster recovery without impacting primary cluster performance.<\/li>\n\n\n\n<li><strong>Hardware Upgrades:<\/strong> Consider upgrading hardware for significant performance gains.<\/li>\n<\/ul>\n\n\n\n<p id=\"ember3356\"><strong>Remember:<\/strong> Fine-tuning Elasticsearch is an ongoing process. Experiment with different settings and monitor their impact to achieve optimal performance for your specific workload.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Email me: <a href=\"mailto:Neil@HarwaniSytems.in\">Neil@HarwaniSytems.in<\/a><\/li>\n\n\n\n<li>Website: <a href=\"http:\/\/www.harwanisystems.in\/\">www.HarwaniSystems.in<\/a><\/li>\n\n\n\n<li>Blog: <a href=\"http:\/\/www.techandtrain.com\/blog\">www.TechAndTrain.com\/blog<\/a><\/li>\n\n\n\n<li>LinkedIn: <a href=\"https:\/\/www.linkedin.com\/in\/neil27\/\">Neil Harwani | LinkedIn<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>ChatGPT &#8211; Fine-tuning an Elasticsearch cluster to address performance issues involves several steps. Elasticsearch is a powerful search and analytics [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":1206,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[343],"tags":[232,344],"class_list":["post-1205","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-elasticsearch","tag-elasticsearch","tag-tuning"],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2024\/01\/ES.png?fit=1280%2C720&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7do02-jr","jetpack-related-posts":[{"id":1053,"url":"https:\/\/www.techandtrain.com\/blog\/2023\/03\/elasticsearch-with-liferay-notes-links-part-1\/","url_meta":{"origin":1205,"position":0},"title":"Elasticsearch with Liferay &#8211; Notes &amp; Links &#8211; Part 1","author":"Neil Harwani","date":"March 26, 2023","format":false,"excerpt":"Below are the important notes & links for configuring Liferay DXP with Elasticsearch. Configuring Elasticsearch \u2013 Liferay Help Center\u00a0- DXP 7.0 Installing Elasticsearch - Liferay Learn\u00a0- DXP latest Securing Elasticsearch 6.5 with X-Pack \u2013 Liferay Help Center\u00a0- DXP 7.0 with ES 6.5 Securing Elasticsearch - Liferay Learn\u00a0- DXP 7.0\/7.1\/7.2\/7.3\/7.4 latest\u2026","rel":"","context":"In &quot;Liferay&quot;","block_context":{"text":"Liferay","link":"https:\/\/www.techandtrain.com\/blog\/category\/liferay\/"},"img":{"alt_text":"Credit: www.Pixabay.com","src":"https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2023\/03\/freelancer-763730_1920.jpg?fit=1200%2C797&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2023\/03\/freelancer-763730_1920.jpg?fit=1200%2C797&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2023\/03\/freelancer-763730_1920.jpg?fit=1200%2C797&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2023\/03\/freelancer-763730_1920.jpg?fit=1200%2C797&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2023\/03\/freelancer-763730_1920.jpg?fit=1200%2C797&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":1084,"url":"https:\/\/www.techandtrain.com\/blog\/2023\/07\/liferay-clustering-part-1\/","url_meta":{"origin":1205,"position":1},"title":"Liferay clustering &#8211; Part 1","author":"Neil Harwani","date":"July 2, 2023","format":false,"excerpt":"Notes on Liferay clustering: Clustering for High Availability - Liferay Learn\u00a0- Main page for clustering Here is what\u2019s required to create an effectively functional DXP cluster: 1. Liferay DXP\u00a0installed\u00a0on separate application server nodes. 2. A\u00a0database or database cluster\u00a0that\u2019s accessible to all nodes 3. A\u00a0File Store\u00a0that\u2019s accessible to all nodes 4.\u2026","rel":"","context":"In &quot;Liferay&quot;","block_context":{"text":"Liferay","link":"https:\/\/www.techandtrain.com\/blog\/category\/liferay\/"},"img":{"alt_text":"Credit: www.Pixabay.com","src":"https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2023\/07\/laptop-1478822_1280.jpg?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2023\/07\/laptop-1478822_1280.jpg?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2023\/07\/laptop-1478822_1280.jpg?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2023\/07\/laptop-1478822_1280.jpg?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2023\/07\/laptop-1478822_1280.jpg?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":1248,"url":"https:\/\/www.techandtrain.com\/blog\/2024\/04\/how-to-debug-liferay-some-pointers-part-2\/","url_meta":{"origin":1205,"position":2},"title":"How to debug Liferay? &#8211; Some pointers &#8211; Part 2","author":"Neil Harwani","date":"April 13, 2024","format":false,"excerpt":"Practical tips to debug Liferay - further to my two earlier posts: How to debug Liferay when nothing is printed in logs and there is a problem? - ChatGPT & BARD Generated | LinkedIn How to debug Liferay? - Some pointers - Part 1 | LinkedIn Setup automated heap dumps\u2026","rel":"","context":"In &quot;Liferay&quot;","block_context":{"text":"Liferay","link":"https:\/\/www.techandtrain.com\/blog\/category\/liferay\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2024\/04\/Debug.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2024\/04\/Debug.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2024\/04\/Debug.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2024\/04\/Debug.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2024\/04\/Debug.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":1175,"url":"https:\/\/www.techandtrain.com\/blog\/2023\/11\/liferay-best-practices-part-2\/","url_meta":{"origin":1205,"position":3},"title":"Liferay best practices &#8211; Part 2","author":"Neil Harwani","date":"November 24, 2023","format":false,"excerpt":"Following up with Part 1 of the series here:\u00a0Liferay best practices - Part 1 | LinkedIn -\u00a0Here is part 2 of Liferay best practices: Look out for settings of ORA-1795 error and it's required settings from Liferay Help Center articles if you are using Oracle If you have heavy usage\u2026","rel":"","context":"In &quot;Liferay&quot;","block_context":{"text":"Liferay","link":"https:\/\/www.techandtrain.com\/blog\/category\/liferay\/"},"img":{"alt_text":"Credits: www.Pixabay.com","src":"https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2023\/11\/Best-Practice.jpg?fit=1200%2C900&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2023\/11\/Best-Practice.jpg?fit=1200%2C900&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2023\/11\/Best-Practice.jpg?fit=1200%2C900&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2023\/11\/Best-Practice.jpg?fit=1200%2C900&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2023\/11\/Best-Practice.jpg?fit=1200%2C900&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":1125,"url":"https:\/\/www.techandtrain.com\/blog\/2023\/09\/performance-tuning-in-liferay-part-1\/","url_meta":{"origin":1205,"position":4},"title":"Performance tuning in Liferay &#8211; Part 1","author":"Neil Harwani","date":"September 1, 2023","format":false,"excerpt":"Expanding on my post here on performance tuning:\u00a0Post | Feed | LinkedIn Below are the main points to work on for a performance tuning engagement in Liferay - Part 1. Firstly, we need to find out what is slow: Database, service calls, elastic search, memory is an issue, threads are\u2026","rel":"","context":"In &quot;Liferay&quot;","block_context":{"text":"Liferay","link":"https:\/\/www.techandtrain.com\/blog\/category\/liferay\/"},"img":{"alt_text":"Credits: www.Pixabay.com","src":"https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2023\/09\/Ferrari.jpg?fit=1200%2C821&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2023\/09\/Ferrari.jpg?fit=1200%2C821&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2023\/09\/Ferrari.jpg?fit=1200%2C821&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2023\/09\/Ferrari.jpg?fit=1200%2C821&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2023\/09\/Ferrari.jpg?fit=1200%2C821&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":1132,"url":"https:\/\/www.techandtrain.com\/blog\/2023\/09\/what-you-should-not-be-doing-in-liferay-part-1\/","url_meta":{"origin":1205,"position":5},"title":"What you should not be doing in Liferay &#8211; Part 1","author":"Neil Harwani","date":"September 30, 2023","format":false,"excerpt":"Here is a list of what you should not be doing in Liferay - Part 1 and also what you should be doing written right next to it in place of the wrong things: Write JDBC calls in portlets. Avoid JDBC calls in portlets. Please explore expando, service builder, dynamic\u2026","rel":"","context":"In &quot;Liferay&quot;","block_context":{"text":"Liferay","link":"https:\/\/www.techandtrain.com\/blog\/category\/liferay\/"},"img":{"alt_text":"Credit: www.Pixabay.com","src":"https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2023\/09\/caution-943376_1280.png?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2023\/09\/caution-943376_1280.png?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2023\/09\/caution-943376_1280.png?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2023\/09\/caution-943376_1280.png?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.techandtrain.com\/blog\/wp-content\/uploads\/2023\/09\/caution-943376_1280.png?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.techandtrain.com\/blog\/wp-json\/wp\/v2\/posts\/1205","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techandtrain.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techandtrain.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techandtrain.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techandtrain.com\/blog\/wp-json\/wp\/v2\/comments?post=1205"}],"version-history":[{"count":1,"href":"https:\/\/www.techandtrain.com\/blog\/wp-json\/wp\/v2\/posts\/1205\/revisions"}],"predecessor-version":[{"id":1207,"href":"https:\/\/www.techandtrain.com\/blog\/wp-json\/wp\/v2\/posts\/1205\/revisions\/1207"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techandtrain.com\/blog\/wp-json\/wp\/v2\/media\/1206"}],"wp:attachment":[{"href":"https:\/\/www.techandtrain.com\/blog\/wp-json\/wp\/v2\/media?parent=1205"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techandtrain.com\/blog\/wp-json\/wp\/v2\/categories?post=1205"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techandtrain.com\/blog\/wp-json\/wp\/v2\/tags?post=1205"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}