{"id":142,"date":"2019-11-19T13:01:51","date_gmt":"2019-11-19T13:01:51","guid":{"rendered":"http:\/\/aeologic.com\/blogs\/?p=142"},"modified":"2025-09-01T14:05:03","modified_gmt":"2025-09-01T08:35:03","slug":"ultimate-solr-guide-2-near-real-time-search","status":"publish","type":"post","link":"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/","title":{"rendered":"Near Real Time Search &#8211; Ultimate Solr Guide"},"content":{"rendered":"\r\n<p>Hi there! Today we will understand one of the most interesting and useful aspects of Apache Solr engine. In most real world applications, data availability is a key aspect that organisations around the globe have to account for in order to stay current with the customer&#8217;s demands. Solr, in particular, is extremely potent when it comes to data management and data availability. It&#8217;s not far fetched to assume that a very special care is taken as to when the data is available after indexing in solr engine.<\/p>\r\n\r\n\r\n\r\n<p>To facilitate this aspect, solr has a concept called &#8220;Near Real Time Search&#8221;,or, more popularly referred to as NRT. Essentially, it tells how long after indexing data is available to search on applications. &#8216;Near&#8217; in NRT is configurable in this regard. Also, it&#8217;s one of the main features of solrCloud and is rarely attempted in master-slave configurations.<\/p>\r\n\r\n\r\n\r\n<p>Now, let&#8217;s understand a related concept of &#8220;commits&#8221;. Document durability and search-ability is controlled by\u00a0<code>commits<\/code>. Commits are either &#8220;hard&#8221; or &#8220;soft&#8221; and can be issued by a client , via a REST call or configured to occur automatically in\u00a0<code>solrconfig.xml<\/code>. Typically in NRT applications, hard commits are configured with\u00a0<code>openSearcher=false<\/code>, and soft commits are configured to make documents visible for search.When a commit occurs, various background tasks are initiated, however, these background tasks do not block additional updates to the index nor do they delay the availability of the documents for search.<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\"><strong>W<\/strong>here Use Near Real Time (NRT) Search?<\/h3>\r\n\r\n\r\n\r\n<p>Near Real Time (NRT) Search is essentially used in all business applications, small or large. For Example:<\/p>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li>E-commerce applications<\/li>\r\n<li>Large scale BFSI sector applications<\/li>\r\n<li>Applications with structured\/unstructured data back-end<\/li>\r\n<li>Applications handling Legal services Data<\/li>\r\n<li>Applications with insurance data<\/li>\r\n<li>Applications pertaining to citizen data, etc.<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\" id=\"commits-and-searching\"><strong>C<\/strong>ommits and Searching<\/h3>\r\n\r\n\r\n\r\n<p>We commit documents to solr index in two ways: <strong>Hard Commit<\/strong> and <strong>Soft Commit<\/strong>. Hard commit, as the name suggests, flushes\/dumps all changes made since last commit to the index in the hard drive. Soft commit, on the other hand, is faster as it does not commit changes in hard drive but only makes the changes available for search.<\/p>\r\n\r\n\r\n\r\n<p>Both hard and soft commits have two primary configuration parameters:\u00a0<code>maxDocs<\/code>\u00a0and\u00a0<code>maxTime<\/code>.<\/p>\r\n\r\n\r\n\r\n<p>Soft commit makes use of two parameters:\u00a0<code>maxDocs<\/code>\u00a0and\u00a0<code>maxTime<\/code>.<\/p>\r\n\r\n\r\n\r\n<table class=\"wp-block-table has-fixed-layout\">\r\n<thead>\r\n<tr>\r\n<th>Parameter<\/th>\r\n<th>Description<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td><code>maxDocs<\/code><\/td>\r\n<td>Integer. Defines the number of documents to queue before pushing them to the index. It works in conjunction with the\u00a0<code>update_handler_autosoftcommit_max_time<\/code>\u00a0parameter in that if either limit is reached, the documents will be pushed to the index.<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><code>maxTime<\/code><\/td>\r\n<td>The number of milliseconds to wait before pushing documents to the index. It works in conjunction with the\u00a0<code>update_handler_autosoftcommit_max_docs<\/code>\u00a0parameter in that if either limit is reached, the documents will be pushed to the index.<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n\r\n\r\n\r\n<p>Another important aspect in this discussion is <strong>Transaction logs(tlog)<\/strong>. In essence, if enabled, a tlog is created after every hard commit and acts as a storehouse of the updates rolled out after the last hard commit. tlogs are important as they prevent data loss to occur. To facilitate this, all index calls are turned to tlogs before the clients, hence, if solr crashes, upon restarting, all these messages are replayed preventing any kind of data loss.<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\" id=\"configuring-commits\"><strong>C<\/strong>onfiguring Commits<\/h3>\r\n\r\n\r\n\r\n<p>It is usually preferable to configure commits (both hard and soft) in\u00a0<code>solrconfig.xml<\/code>\u00a0and avoid sending commits from an external source. Use steps below to configure hard\/soft commit values as needed.<\/p>\r\n\r\n\r\n\r\n<p><strong>Step -1 : Fire up a Solr instance &#8211;<\/strong><\/p>\r\n\r\n\r\n\r\n<p>Use command <strong>.\/solr start<\/strong> once in &#8220;bin&#8221; folder. Following window appears.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><img decoding=\"async\" class=\"wp-image-172\" src=\"http:\/\/aeologic.com\/blogs\/wp-content\/uploads\/2019\/11\/Screenshot-from-2019-11-19-17-33-32-1024x235.png\" alt=\"\" \/>\r\n<figcaption>FIG 1: SOLR ADMIN UI SCREEN<\/figcaption>\r\n<\/figure>\r\n\r\n\r\n\r\n<p><strong>Step -2 : Select &#8220;Files&#8221; in &#8220;filmsdata&#8221; core<\/strong> &#8211;<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><img decoding=\"async\" class=\"wp-image-173\" src=\"http:\/\/aeologic.com\/blogs\/wp-content\/uploads\/2019\/11\/Screenshot-from-2019-11-19-17-36-44-1024x317.png\" alt=\"\" \/>\r\n<figcaption>FIG 2: SELECTING &#8220;Files&#8221; FROM filmsdata CORE<\/figcaption>\r\n<\/figure>\r\n\r\n\r\n\r\n<p><strong>Step 3: Modifying values for soft\/hard commit &#8211;<\/strong><\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><img decoding=\"async\" class=\"wp-image-174\" src=\"http:\/\/aeologic.com\/blogs\/wp-content\/uploads\/2019\/11\/carbon-18-1024x420.png\" alt=\"\" \/>\r\n<figcaption>FIG 3: CONFIGURING HARD-COMMIT VALUE<\/figcaption>\r\n<\/figure>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><img decoding=\"async\" class=\"wp-image-176\" src=\"http:\/\/aeologic.com\/blogs\/wp-content\/uploads\/2019\/11\/carbon-20-1024x386.png\" alt=\"\" \/>\r\n<figcaption><em>FIG 4: CONFIGURING SOFT-COMMIT VALUE<\/em><\/figcaption>\r\n<\/figure>\r\n\r\n\r\n\r\n<p>The time chosen for\u00a0<code>autoSoftCommit<\/code>\u00a0determines the maximum time after a document is sent to Solr before it becomes searchable and does not affect the transaction log. Choose as long an interval as your application can tolerate for this value depending on the requirements.<\/p>\r\n\r\n\r\n\r\n<p><strong>Pro tip<\/strong> : For high bulk indexing, especially for the initial load if there is no searching, consider turning off\u00a0<code>autoSoftCommit<\/code>\u00a0by specifying a value of\u00a0<code>-1<\/code>\u00a0for the maxTime parameter.<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\" style=\"text-align: left\"><strong>C<\/strong>onclusion<\/h3>\r\n\r\n\r\n\r\n<p>NRT is very important and widely used aspect in solr applications and instrumental in handling bulk indexing operations. Correctly configured solr instance can drastically impact performance in terms of data availability and searchability and thus create a huge impact on business.<\/p>\r\n\r\n\r\n\r\n<p>Thanks for taking time to read this article! You can reach out to us on <a href=\"https:\/\/www.facebook.com\/AeoLogicTech\/\"><em><strong>Facebook<\/strong><\/em><\/a><em><strong>, <\/strong><\/em><a href=\"https:\/\/twitter.com\/aeologictech\"><em><strong>Twitter<\/strong><\/em><\/a> and <a href=\"https:\/\/www.linkedin.com\/company\/aeologic-technologies\"><strong><em>Linkedin<\/em><\/strong><\/a> in case of any concerns\/queries.<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>Hi there! Today we will understand one of the most interesting and useful aspects of Apache Solr engine. In most real world applications, data availability is a key aspect that organisations around the globe have to account for in order to stay current with the customer&#8217;s demands. Solr, in particular, is extremely potent when it comes to data management and data availability. It&#8217;s not far fetched to assume that a very special care is taken as to when the data is available after indexing in solr engine. To facilitate this aspect, solr has a concept called &#8220;Near Real Time Search&#8221;,or, more popularly referred to as NRT. Essentially, it tells how long after indexing data is available to search on applications. &#8216;Near&#8217; in NRT is configurable in this regard. Also, it&#8217;s one of the main features of solrCloud and is rarely attempted in master-slave configurations. Now, let&#8217;s understand a related concept of &#8220;commits&#8221;. Document durability and search-ability is controlled by\u00a0commits. Commits are either &#8220;hard&#8221; or &#8220;soft&#8221; and can be issued by a client , via a REST call or configured to occur automatically in\u00a0solrconfig.xml. Typically in NRT applications, hard commits are configured with\u00a0openSearcher=false, and soft commits are configured to make documents visible for search.When a commit occurs, various background tasks are initiated, however, these background tasks do not block additional updates to the index nor do they delay the availability of the documents for search. Where Use Near Real Time (NRT) Search? Near Real Time (NRT) Search is essentially used in all business applications, small or large. For Example: E-commerce applications Large scale BFSI sector applications Applications with structured\/unstructured data back-end Applications handling Legal services Data Applications with insurance data Applications pertaining to citizen data, etc. Commits and Searching We commit documents to solr index in two ways: Hard Commit and Soft Commit. Hard commit, as the name suggests, flushes\/dumps all changes made since last commit to the index in the hard drive. Soft commit, on the other hand, is faster as it does not commit changes in hard drive but only makes the changes available for search. Both hard and soft commits have two primary configuration parameters:\u00a0maxDocs\u00a0and\u00a0maxTime. Soft commit makes use of two parameters:\u00a0maxDocs\u00a0and\u00a0maxTime. Parameter Description maxDocs Integer. Defines the number of documents to queue before pushing them to the index. It works in conjunction with the\u00a0update_handler_autosoftcommit_max_time\u00a0parameter in that if either limit is reached, the documents will be pushed to the index. maxTime The number of milliseconds to wait before pushing documents to the index. It works in conjunction with the\u00a0update_handler_autosoftcommit_max_docs\u00a0parameter in that if either limit is reached, the documents will be pushed to the index. Another important aspect in this discussion is Transaction logs(tlog). In essence, if enabled, a tlog is created after every hard commit and acts as a storehouse of the updates rolled out after the last hard commit. tlogs are important as they prevent data loss to occur. To facilitate this, all index calls are turned to tlogs before the clients, hence, if solr crashes, upon restarting, all these messages are replayed preventing any kind of data loss. Configuring Commits It is usually preferable to configure commits (both hard and soft) in\u00a0solrconfig.xml\u00a0and avoid sending commits from an external source. Use steps below to configure hard\/soft commit values as needed. Step -1 : Fire up a Solr instance &#8211; Use command .\/solr start once in &#8220;bin&#8221; folder. Following window appears. Step -2 : Select &#8220;Files&#8221; in &#8220;filmsdata&#8221; core &#8211; Step 3: Modifying values for soft\/hard commit &#8211; The time chosen for\u00a0autoSoftCommit\u00a0determines the maximum time after a document is sent to Solr before it becomes searchable and does not affect the transaction log. Choose as long an interval as your application can tolerate for this value depending on the requirements. Pro tip : For high bulk indexing, especially for the initial load if there is no searching, consider turning off\u00a0autoSoftCommit\u00a0by specifying a value of\u00a0-1\u00a0for the maxTime parameter. Conclusion NRT is very important and widely used aspect in solr applications and instrumental in handling bulk indexing operations. Correctly configured solr instance can drastically impact performance in terms of data availability and searchability and thus create a huge impact on business. Thanks for taking time to read this article! You can reach out to us on Facebook, Twitter and Linkedin in case of any concerns\/queries.<\/p>\n","protected":false},"author":3,"featured_media":162,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[342,41],"tags":[14,45,46,47,9,8,48,49,50,7],"class_list":["post-142","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bfsi","category-solr","tag-apache-solr","tag-enterprise-search","tag-lucene","tag-master","tag-near-real-time","tag-nrt","tag-performance","tag-performance-tips","tag-slave","tag-solr"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Near Real Time Search - Ultimate Solr Guide - Aeologic Blog<\/title>\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.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Near Real Time Search - Ultimate Solr Guide - Aeologic Blog\" \/>\n<meta property=\"og:description\" content=\"Hi there! Today we will understand one of the most interesting and useful aspects of Apache Solr engine. In most real world applications, data availability is a key aspect that organisations around the globe have to account for in order to stay current with the customer&#8217;s demands. Solr, in particular, is extremely potent when it comes to data management and data availability. It&#8217;s not far fetched to assume that a very special care is taken as to when the data is available after indexing in solr engine. To facilitate this aspect, solr has a concept called &#8220;Near Real Time Search&#8221;,or, more popularly referred to as NRT. Essentially, it tells how long after indexing data is available to search on applications. &#8216;Near&#8217; in NRT is configurable in this regard. Also, it&#8217;s one of the main features of solrCloud and is rarely attempted in master-slave configurations. Now, let&#8217;s understand a related concept of &#8220;commits&#8221;. Document durability and search-ability is controlled by\u00a0commits. Commits are either &#8220;hard&#8221; or &#8220;soft&#8221; and can be issued by a client , via a REST call or configured to occur automatically in\u00a0solrconfig.xml. Typically in NRT applications, hard commits are configured with\u00a0openSearcher=false, and soft commits are configured to make documents visible for search.When a commit occurs, various background tasks are initiated, however, these background tasks do not block additional updates to the index nor do they delay the availability of the documents for search. Where Use Near Real Time (NRT) Search? Near Real Time (NRT) Search is essentially used in all business applications, small or large. For Example: E-commerce applications Large scale BFSI sector applications Applications with structured\/unstructured data back-end Applications handling Legal services Data Applications with insurance data Applications pertaining to citizen data, etc. Commits and Searching We commit documents to solr index in two ways: Hard Commit and Soft Commit. Hard commit, as the name suggests, flushes\/dumps all changes made since last commit to the index in the hard drive. Soft commit, on the other hand, is faster as it does not commit changes in hard drive but only makes the changes available for search. Both hard and soft commits have two primary configuration parameters:\u00a0maxDocs\u00a0and\u00a0maxTime. Soft commit makes use of two parameters:\u00a0maxDocs\u00a0and\u00a0maxTime. Parameter Description maxDocs Integer. Defines the number of documents to queue before pushing them to the index. It works in conjunction with the\u00a0update_handler_autosoftcommit_max_time\u00a0parameter in that if either limit is reached, the documents will be pushed to the index. maxTime The number of milliseconds to wait before pushing documents to the index. It works in conjunction with the\u00a0update_handler_autosoftcommit_max_docs\u00a0parameter in that if either limit is reached, the documents will be pushed to the index. Another important aspect in this discussion is Transaction logs(tlog). In essence, if enabled, a tlog is created after every hard commit and acts as a storehouse of the updates rolled out after the last hard commit. tlogs are important as they prevent data loss to occur. To facilitate this, all index calls are turned to tlogs before the clients, hence, if solr crashes, upon restarting, all these messages are replayed preventing any kind of data loss. Configuring Commits It is usually preferable to configure commits (both hard and soft) in\u00a0solrconfig.xml\u00a0and avoid sending commits from an external source. Use steps below to configure hard\/soft commit values as needed. Step -1 : Fire up a Solr instance &#8211; Use command .\/solr start once in &#8220;bin&#8221; folder. Following window appears. Step -2 : Select &#8220;Files&#8221; in &#8220;filmsdata&#8221; core &#8211; Step 3: Modifying values for soft\/hard commit &#8211; The time chosen for\u00a0autoSoftCommit\u00a0determines the maximum time after a document is sent to Solr before it becomes searchable and does not affect the transaction log. Choose as long an interval as your application can tolerate for this value depending on the requirements. Pro tip : For high bulk indexing, especially for the initial load if there is no searching, consider turning off\u00a0autoSoftCommit\u00a0by specifying a value of\u00a0-1\u00a0for the maxTime parameter. Conclusion NRT is very important and widely used aspect in solr applications and instrumental in handling bulk indexing operations. Correctly configured solr instance can drastically impact performance in terms of data availability and searchability and thus create a huge impact on business. Thanks for taking time to read this article! You can reach out to us on Facebook, Twitter and Linkedin in case of any concerns\/queries.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/\" \/>\n<meta property=\"og:site_name\" content=\"Aeologic Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/AeoLogicTech\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-11-19T13:01:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-01T08:35:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.aeologic.com\/blog\/wp-content\/uploads\/2019\/11\/solr-updated-2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"521\" \/>\n\t<meta property=\"og:image:height\" content=\"300\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Manoj Kumar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@aeologictech\" \/>\n<meta name=\"twitter:site\" content=\"@aeologictech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Manoj Kumar\" \/>\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\",\"BlogPosting\"],\"@id\":\"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/\"},\"author\":{\"name\":\"Manoj Kumar\",\"@id\":\"https:\/\/www.aeologic.com\/blog\/#\/schema\/person\/13549984ba8e5f441cc733ed20d7daa4\"},\"headline\":\"Near Real Time Search &#8211; Ultimate Solr Guide\",\"datePublished\":\"2019-11-19T13:01:51+00:00\",\"dateModified\":\"2025-09-01T08:35:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/\"},\"wordCount\":755,\"publisher\":{\"@id\":\"https:\/\/www.aeologic.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.aeologic.com\/blog\/wp-content\/uploads\/2019\/11\/solr-updated-2.png\",\"keywords\":[\"apache solr\",\"enterprise search\",\"lucene\",\"master\",\"Near Real Time\",\"NRT\",\"performance\",\"performance tips\",\"slave\",\"solr\"],\"articleSection\":[\"BFSI\",\"Solr\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/\",\"url\":\"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/\",\"name\":\"Near Real Time Search - Ultimate Solr Guide - Aeologic Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.aeologic.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.aeologic.com\/blog\/wp-content\/uploads\/2019\/11\/solr-updated-2.png\",\"datePublished\":\"2019-11-19T13:01:51+00:00\",\"dateModified\":\"2025-09-01T08:35:03+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/#primaryimage\",\"url\":\"https:\/\/www.aeologic.com\/blog\/wp-content\/uploads\/2019\/11\/solr-updated-2.png\",\"contentUrl\":\"https:\/\/www.aeologic.com\/blog\/wp-content\/uploads\/2019\/11\/solr-updated-2.png\",\"width\":521,\"height\":300},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.aeologic.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Near Real Time Search &#8211; Ultimate Solr Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.aeologic.com\/blog\/#website\",\"url\":\"https:\/\/www.aeologic.com\/blog\/\",\"name\":\"Aeologic Blog\",\"description\":\"Aeologic\",\"publisher\":{\"@id\":\"https:\/\/www.aeologic.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.aeologic.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.aeologic.com\/blog\/#organization\",\"name\":\"AeoLogic Technologies\",\"url\":\"https:\/\/www.aeologic.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.aeologic.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.aeologic.com\/blog\/wp-content\/uploads\/2022\/05\/new-logo-aeo.jpg\",\"contentUrl\":\"https:\/\/www.aeologic.com\/blog\/wp-content\/uploads\/2022\/05\/new-logo-aeo.jpg\",\"width\":385,\"height\":162,\"caption\":\"AeoLogic Technologies\"},\"image\":{\"@id\":\"https:\/\/www.aeologic.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/AeoLogicTech\/\",\"https:\/\/x.com\/aeologictech\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.aeologic.com\/blog\/#\/schema\/person\/13549984ba8e5f441cc733ed20d7daa4\",\"name\":\"Manoj Kumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.aeologic.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/24ce77602da5eb5715d74a95733f6c7548e2af73f5a493f9bc0bf55f611d025e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/24ce77602da5eb5715d74a95733f6c7548e2af73f5a493f9bc0bf55f611d025e?s=96&d=mm&r=g\",\"caption\":\"Manoj Kumar\"},\"description\":\"Manoj Kumar is a seasoned Digital Marketing Manager and passionate Tech Blogger with deep expertise in SEO, AI trends, and emerging digital technologies. He writes about innovative solutions that drive growth and transformation across industry. Featured on - YOURSTORY | TECHSLING | ELEARNINGINDUSTRY | DATASCIENCECENTRAL | TIMESOFINDIA | MEDIUM | DATAFLOQ\",\"sameAs\":[\"https:\/\/www.aeologic.com\/\",\"https:\/\/www.linkedin.com\/in\/manoj-kumar-rajput\/\"],\"url\":\"https:\/\/www.aeologic.com\/blog\/author\/manoj\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Near Real Time Search - Ultimate Solr Guide - Aeologic Blog","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.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/","og_locale":"en_US","og_type":"article","og_title":"Near Real Time Search - Ultimate Solr Guide - Aeologic Blog","og_description":"Hi there! Today we will understand one of the most interesting and useful aspects of Apache Solr engine. In most real world applications, data availability is a key aspect that organisations around the globe have to account for in order to stay current with the customer&#8217;s demands. Solr, in particular, is extremely potent when it comes to data management and data availability. It&#8217;s not far fetched to assume that a very special care is taken as to when the data is available after indexing in solr engine. To facilitate this aspect, solr has a concept called &#8220;Near Real Time Search&#8221;,or, more popularly referred to as NRT. Essentially, it tells how long after indexing data is available to search on applications. &#8216;Near&#8217; in NRT is configurable in this regard. Also, it&#8217;s one of the main features of solrCloud and is rarely attempted in master-slave configurations. Now, let&#8217;s understand a related concept of &#8220;commits&#8221;. Document durability and search-ability is controlled by\u00a0commits. Commits are either &#8220;hard&#8221; or &#8220;soft&#8221; and can be issued by a client , via a REST call or configured to occur automatically in\u00a0solrconfig.xml. Typically in NRT applications, hard commits are configured with\u00a0openSearcher=false, and soft commits are configured to make documents visible for search.When a commit occurs, various background tasks are initiated, however, these background tasks do not block additional updates to the index nor do they delay the availability of the documents for search. Where Use Near Real Time (NRT) Search? Near Real Time (NRT) Search is essentially used in all business applications, small or large. For Example: E-commerce applications Large scale BFSI sector applications Applications with structured\/unstructured data back-end Applications handling Legal services Data Applications with insurance data Applications pertaining to citizen data, etc. Commits and Searching We commit documents to solr index in two ways: Hard Commit and Soft Commit. Hard commit, as the name suggests, flushes\/dumps all changes made since last commit to the index in the hard drive. Soft commit, on the other hand, is faster as it does not commit changes in hard drive but only makes the changes available for search. Both hard and soft commits have two primary configuration parameters:\u00a0maxDocs\u00a0and\u00a0maxTime. Soft commit makes use of two parameters:\u00a0maxDocs\u00a0and\u00a0maxTime. Parameter Description maxDocs Integer. Defines the number of documents to queue before pushing them to the index. It works in conjunction with the\u00a0update_handler_autosoftcommit_max_time\u00a0parameter in that if either limit is reached, the documents will be pushed to the index. maxTime The number of milliseconds to wait before pushing documents to the index. It works in conjunction with the\u00a0update_handler_autosoftcommit_max_docs\u00a0parameter in that if either limit is reached, the documents will be pushed to the index. Another important aspect in this discussion is Transaction logs(tlog). In essence, if enabled, a tlog is created after every hard commit and acts as a storehouse of the updates rolled out after the last hard commit. tlogs are important as they prevent data loss to occur. To facilitate this, all index calls are turned to tlogs before the clients, hence, if solr crashes, upon restarting, all these messages are replayed preventing any kind of data loss. Configuring Commits It is usually preferable to configure commits (both hard and soft) in\u00a0solrconfig.xml\u00a0and avoid sending commits from an external source. Use steps below to configure hard\/soft commit values as needed. Step -1 : Fire up a Solr instance &#8211; Use command .\/solr start once in &#8220;bin&#8221; folder. Following window appears. Step -2 : Select &#8220;Files&#8221; in &#8220;filmsdata&#8221; core &#8211; Step 3: Modifying values for soft\/hard commit &#8211; The time chosen for\u00a0autoSoftCommit\u00a0determines the maximum time after a document is sent to Solr before it becomes searchable and does not affect the transaction log. Choose as long an interval as your application can tolerate for this value depending on the requirements. Pro tip : For high bulk indexing, especially for the initial load if there is no searching, consider turning off\u00a0autoSoftCommit\u00a0by specifying a value of\u00a0-1\u00a0for the maxTime parameter. Conclusion NRT is very important and widely used aspect in solr applications and instrumental in handling bulk indexing operations. Correctly configured solr instance can drastically impact performance in terms of data availability and searchability and thus create a huge impact on business. Thanks for taking time to read this article! You can reach out to us on Facebook, Twitter and Linkedin in case of any concerns\/queries.","og_url":"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/","og_site_name":"Aeologic Blog","article_publisher":"https:\/\/www.facebook.com\/AeoLogicTech\/","article_published_time":"2019-11-19T13:01:51+00:00","article_modified_time":"2025-09-01T08:35:03+00:00","og_image":[{"width":521,"height":300,"url":"https:\/\/www.aeologic.com\/blog\/wp-content\/uploads\/2019\/11\/solr-updated-2.png","type":"image\/png"}],"author":"Manoj Kumar","twitter_card":"summary_large_image","twitter_creator":"@aeologictech","twitter_site":"@aeologictech","twitter_misc":{"Written by":"Manoj Kumar","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/#article","isPartOf":{"@id":"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/"},"author":{"name":"Manoj Kumar","@id":"https:\/\/www.aeologic.com\/blog\/#\/schema\/person\/13549984ba8e5f441cc733ed20d7daa4"},"headline":"Near Real Time Search &#8211; Ultimate Solr Guide","datePublished":"2019-11-19T13:01:51+00:00","dateModified":"2025-09-01T08:35:03+00:00","mainEntityOfPage":{"@id":"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/"},"wordCount":755,"publisher":{"@id":"https:\/\/www.aeologic.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/#primaryimage"},"thumbnailUrl":"https:\/\/www.aeologic.com\/blog\/wp-content\/uploads\/2019\/11\/solr-updated-2.png","keywords":["apache solr","enterprise search","lucene","master","Near Real Time","NRT","performance","performance tips","slave","solr"],"articleSection":["BFSI","Solr"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/","url":"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/","name":"Near Real Time Search - Ultimate Solr Guide - Aeologic Blog","isPartOf":{"@id":"https:\/\/www.aeologic.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/#primaryimage"},"image":{"@id":"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/#primaryimage"},"thumbnailUrl":"https:\/\/www.aeologic.com\/blog\/wp-content\/uploads\/2019\/11\/solr-updated-2.png","datePublished":"2019-11-19T13:01:51+00:00","dateModified":"2025-09-01T08:35:03+00:00","breadcrumb":{"@id":"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/#primaryimage","url":"https:\/\/www.aeologic.com\/blog\/wp-content\/uploads\/2019\/11\/solr-updated-2.png","contentUrl":"https:\/\/www.aeologic.com\/blog\/wp-content\/uploads\/2019\/11\/solr-updated-2.png","width":521,"height":300},{"@type":"BreadcrumbList","@id":"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide-2-near-real-time-search\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.aeologic.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Near Real Time Search &#8211; Ultimate Solr Guide"}]},{"@type":"WebSite","@id":"https:\/\/www.aeologic.com\/blog\/#website","url":"https:\/\/www.aeologic.com\/blog\/","name":"Aeologic Blog","description":"Aeologic","publisher":{"@id":"https:\/\/www.aeologic.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.aeologic.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.aeologic.com\/blog\/#organization","name":"AeoLogic Technologies","url":"https:\/\/www.aeologic.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.aeologic.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.aeologic.com\/blog\/wp-content\/uploads\/2022\/05\/new-logo-aeo.jpg","contentUrl":"https:\/\/www.aeologic.com\/blog\/wp-content\/uploads\/2022\/05\/new-logo-aeo.jpg","width":385,"height":162,"caption":"AeoLogic Technologies"},"image":{"@id":"https:\/\/www.aeologic.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/AeoLogicTech\/","https:\/\/x.com\/aeologictech"]},{"@type":"Person","@id":"https:\/\/www.aeologic.com\/blog\/#\/schema\/person\/13549984ba8e5f441cc733ed20d7daa4","name":"Manoj Kumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.aeologic.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/24ce77602da5eb5715d74a95733f6c7548e2af73f5a493f9bc0bf55f611d025e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/24ce77602da5eb5715d74a95733f6c7548e2af73f5a493f9bc0bf55f611d025e?s=96&d=mm&r=g","caption":"Manoj Kumar"},"description":"Manoj Kumar is a seasoned Digital Marketing Manager and passionate Tech Blogger with deep expertise in SEO, AI trends, and emerging digital technologies. He writes about innovative solutions that drive growth and transformation across industry. Featured on - YOURSTORY | TECHSLING | ELEARNINGINDUSTRY | DATASCIENCECENTRAL | TIMESOFINDIA | MEDIUM | DATAFLOQ","sameAs":["https:\/\/www.aeologic.com\/","https:\/\/www.linkedin.com\/in\/manoj-kumar-rajput\/"],"url":"https:\/\/www.aeologic.com\/blog\/author\/manoj\/"}]}},"_links":{"self":[{"href":"https:\/\/www.aeologic.com\/blog\/wp-json\/wp\/v2\/posts\/142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aeologic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aeologic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aeologic.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aeologic.com\/blog\/wp-json\/wp\/v2\/comments?post=142"}],"version-history":[{"count":1,"href":"https:\/\/www.aeologic.com\/blog\/wp-json\/wp\/v2\/posts\/142\/revisions"}],"predecessor-version":[{"id":14495,"href":"https:\/\/www.aeologic.com\/blog\/wp-json\/wp\/v2\/posts\/142\/revisions\/14495"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.aeologic.com\/blog\/wp-json\/wp\/v2\/media\/162"}],"wp:attachment":[{"href":"https:\/\/www.aeologic.com\/blog\/wp-json\/wp\/v2\/media?parent=142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aeologic.com\/blog\/wp-json\/wp\/v2\/categories?post=142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aeologic.com\/blog\/wp-json\/wp\/v2\/tags?post=142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}