{"id":1327,"date":"2020-06-08T04:52:34","date_gmt":"2020-06-08T04:52:34","guid":{"rendered":"https:\/\/www.aeologic.com\/insights\/?p=1327"},"modified":"2020-06-18T12:22:44","modified_gmt":"2020-06-18T12:22:44","slug":"ultimate-solr-guide21-morelikethis","status":"publish","type":"post","link":"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide21-morelikethis\/","title":{"rendered":"MoreLikeThis &#8211; Ultimate Solr Guide"},"content":{"rendered":"\n<p>The&nbsp;<code>MoreLikeThis<\/code>&nbsp;search component enables users to query for documents similar to a document in their result list.<\/p>\n\n\n\n<p>It does this by using terms from the original document to find similar documents in the index.<\/p>\n\n\n\n<p>There are three ways to use MoreLikeThis. The first, and most common, is to use it as a request handler. In this case, you would send text to the MoreLikeThis request handler as needed (as in when a user clicked on a &#8220;similar documents&#8221; link).<\/p>\n\n\n\n<p>The second is to use it as a search component. This is less desirable since it performs the MoreLikeThis analysis on every document returned. This may slow search results.<\/p>\n\n\n\n<p>The final approach is to use it as a request handler but with externally supplied text. This case, also referred to as the MoreLikeThisHandler, will supply information about similar documents in the index based on the text of the input document.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-morelikethis-works\">How MoreLikeThis Works<\/h2>\n\n\n\n<p><code>MoreLikeThis<\/code>&nbsp;constructs a Lucene query based on terms in a document. It does this by pulling terms from the defined list of fields ( see the&nbsp;<code>mlt.fl<\/code>&nbsp;parameter, below). For best results, the fields should have stored term vectors in&nbsp;<code>schema.xml<\/code>. For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;field name=\"cat\" ... termVectors=\"true\" \/><\/code><\/pre>\n\n\n\n<p>If term vectors are not stored,&nbsp;<code>MoreLikeThis<\/code>&nbsp;will generate terms from stored fields. A&nbsp;<code>uniqueKey<\/code>&nbsp;must also be stored in order for MoreLikeThis to work properly.<\/p>\n\n\n\n<p>The next phase filters terms from the original document using thresholds defined with the MoreLikeThis parameters. Finally, a query is run with these terms, and any other query parameters that have been defined (see the&nbsp;<code>mlt.qf<\/code>&nbsp;parameter, below) and a new document set is returned.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"common-parameters-for-morelikethis\">Common Parameters for MoreLikeThis<\/h2>\n\n\n\n<p>The table below summarizes the&nbsp;<code>MoreLikeThis<\/code>&nbsp;parameters supported by Lucene\/Solr. These parameters can be used with any of the three possible MoreLikeThis approaches.<code>mlt.fl<\/code>Specifies the fields to use for similarity. If possible, these should have stored&nbsp;<code>termVectors<\/code>.<code>mlt.mintf<\/code>Specifies the Minimum Term Frequency, the frequency below which terms will be ignored in the source document.<code>mlt.mindf<\/code>Specifies the Minimum Document Frequency, the frequency at which words will be ignored which do not occur in at least this many documents.<code>mlt.maxdf<\/code>Specifies the Maximum Document Frequency, the frequency at which words will be ignored which occur in more than this many documents.<code>mlt.maxdfpct<\/code>Specifies the Maximum Document Frequency using a relative ratio to the number of documents in the index. The argument must be an integer between 0 and 100. For example 75 means the word will be ignored if it occurs in more than 75 percent of the documents in the index.<code>mlt.minwl<\/code>Sets the minimum word length below which words will be ignored.<code>mlt.maxwl<\/code>Sets the maximum word length above which words will be ignored.<code>mlt.maxqt<\/code>Sets the maximum number of query terms that will be included in any generated query.<code>mlt.maxntp<\/code>Sets the maximum number of tokens to parse in each example document field that is not stored with TermVector support.<code>mlt.boost<\/code>Specifies if the query will be boosted by the interesting term relevance. It can be either &#8220;true&#8221; or &#8220;false&#8221;.<code>mlt.qf<\/code>Query fields and their boosts using the same format as that used by the&nbsp;<a href=\"https:\/\/lucene.apache.org\/solr\/guide\/8_5\/the-dismax-query-parser.html#the-dismax-query-parser\">DisMax Query Parser<\/a>. These fields must also be specified in&nbsp;<code>mlt.fl<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"parameters-for-the-morelikethiscomponent\">Parameters for the MoreLikeThisComponent<\/h2>\n\n\n\n<p>Using MoreLikeThis as a search component returns similar documents for each document in the response set. In addition to the common parameters, these additional options are available:<code>mlt<\/code>If set to&nbsp;<code>true<\/code>, activates the&nbsp;<code>MoreLikeThis<\/code>&nbsp;component and enables Solr to return&nbsp;<code>MoreLikeThis<\/code>&nbsp;results.<code>mlt.count<\/code>Specifies the number of similar documents to be returned for each result. The default value is 5.<code>mlt.interestingTerms<\/code><em>Same as defined below for the MLT Handler.<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"parameters-for-the-morelikethishandler\">Parameters for the MoreLikeThisHandler<\/h2>\n\n\n\n<p>The table below summarizes parameters accessible through the&nbsp;<code>MoreLikeThisHandler<\/code>. It supports faceting, paging, and filtering using common query parameters, but does not work well with alternate query parsers.<code>mlt.match.include<\/code>Specifies whether or not the response should include the matched document. If set to false, the response will look like a normal select response.<code>mlt.match.offset<\/code>Specifies an offset into the main query search results to locate the document on which the&nbsp;<code>MoreLikeThis<\/code>&nbsp;query should operate. By default, the query operates on the first result for the q parameter.<code>mlt.interestingTerms<\/code>Controls how the&nbsp;<code>MoreLikeThis<\/code>&nbsp;component presents the &#8220;interesting&#8221; terms (the top TF\/IDF terms) for the query. It supports three settings: The setting&nbsp;<code>list<\/code>&nbsp;lists the terms. The setting&nbsp;<code>none<\/code>&nbsp;lists no terms. The setting&nbsp;<code>details<\/code>&nbsp;lists the terms along with the boost value used for each term. Unless&nbsp;<code>mlt.boost=true<\/code>, all terms will have&nbsp;<code>boost=1.0<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"morelikethis-query-parser\">MoreLikeThis Query Parser<\/h2>\n\n\n\n<p>The&nbsp;<code>mlt<\/code>&nbsp;query parser provides a mechanism to retrieve documents similar to a given document, like the handler. More information on the usage of the mlt query parser can be found in the section&nbsp;<a href=\"https:\/\/lucene.apache.org\/solr\/guide\/8_5\/other-parsers.html#other-parsers\">Other Parsers<\/a>.<\/p>\n\n\n\n<p>This is it for today, stay tuned for more informative posts in future.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The&nbsp;MoreLikeThis&nbsp;search component enables users to query for documents similar to a document in their result list. It does this by using terms from the original document to find similar documents in the index. There are three ways to use MoreLikeThis. The first, and most common, is to use it as a request handler. In this case, you would send text to the MoreLikeThis request handler as needed (as in when a user clicked on a &#8220;similar documents&#8221; link). The second is to use it as a search component. This is less desirable since it performs the MoreLikeThis analysis on every document returned. This may slow search results. The final approach is to use it as a request handler but with externally supplied text. This case, also referred to as the MoreLikeThisHandler, will supply information about similar documents in the index based on the text of the input document. How MoreLikeThis Works MoreLikeThis&nbsp;constructs a Lucene query based on terms in a document. It does this by pulling terms from the defined list of fields ( see the&nbsp;mlt.fl&nbsp;parameter, below). For best results, the fields should have stored term vectors in&nbsp;schema.xml. For example: If term vectors are not stored,&nbsp;MoreLikeThis&nbsp;will generate terms from stored fields. A&nbsp;uniqueKey&nbsp;must also be stored in order for MoreLikeThis to work properly. The next phase filters terms from the original document using thresholds defined with the MoreLikeThis parameters. Finally, a query is run with these terms, and any other query parameters that have been defined (see the&nbsp;mlt.qf&nbsp;parameter, below) and a new document set is returned. Common Parameters for MoreLikeThis The table below summarizes the&nbsp;MoreLikeThis&nbsp;parameters supported by Lucene\/Solr. These parameters can be used with any of the three possible MoreLikeThis approaches.mlt.flSpecifies the fields to use for similarity. If possible, these should have stored&nbsp;termVectors.mlt.mintfSpecifies the Minimum Term Frequency, the frequency below which terms will be ignored in the source document.mlt.mindfSpecifies the Minimum Document Frequency, the frequency at which words will be ignored which do not occur in at least this many documents.mlt.maxdfSpecifies the Maximum Document Frequency, the frequency at which words will be ignored which occur in more than this many documents.mlt.maxdfpctSpecifies the Maximum Document Frequency using a relative ratio to the number of documents in the index. The argument must be an integer between 0 and 100. For example 75 means the word will be ignored if it occurs in more than 75 percent of the documents in the index.mlt.minwlSets the minimum word length below which words will be ignored.mlt.maxwlSets the maximum word length above which words will be ignored.mlt.maxqtSets the maximum number of query terms that will be included in any generated query.mlt.maxntpSets the maximum number of tokens to parse in each example document field that is not stored with TermVector support.mlt.boostSpecifies if the query will be boosted by the interesting term relevance. It can be either &#8220;true&#8221; or &#8220;false&#8221;.mlt.qfQuery fields and their boosts using the same format as that used by the&nbsp;DisMax Query Parser. These fields must also be specified in&nbsp;mlt.fl. Parameters for the MoreLikeThisComponent Using MoreLikeThis as a search component returns similar documents for each document in the response set. In addition to the common parameters, these additional options are available:mltIf set to&nbsp;true, activates the&nbsp;MoreLikeThis&nbsp;component and enables Solr to return&nbsp;MoreLikeThis&nbsp;results.mlt.countSpecifies the number of similar documents to be returned for each result. The default value is 5.mlt.interestingTermsSame as defined below for the MLT Handler. Parameters for the MoreLikeThisHandler The table below summarizes parameters accessible through the&nbsp;MoreLikeThisHandler. It supports faceting, paging, and filtering using common query parameters, but does not work well with alternate query parsers.mlt.match.includeSpecifies whether or not the response should include the matched document. If set to false, the response will look like a normal select response.mlt.match.offsetSpecifies an offset into the main query search results to locate the document on which the&nbsp;MoreLikeThis&nbsp;query should operate. By default, the query operates on the first result for the q parameter.mlt.interestingTermsControls how the&nbsp;MoreLikeThis&nbsp;component presents the &#8220;interesting&#8221; terms (the top TF\/IDF terms) for the query. It supports three settings: The setting&nbsp;list&nbsp;lists the terms. The setting&nbsp;none&nbsp;lists no terms. The setting&nbsp;details&nbsp;lists the terms along with the boost value used for each term. Unless&nbsp;mlt.boost=true, all terms will have&nbsp;boost=1.0. MoreLikeThis Query Parser The&nbsp;mlt&nbsp;query parser provides a mechanism to retrieve documents similar to a given document, like the handler. More information on the usage of the mlt query parser can be found in the section&nbsp;Other Parsers. This is it for today, stay tuned for more informative posts in future.<\/p>\n","protected":false},"author":3,"featured_media":1375,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[128],"class_list":["post-1327","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-solr","tag-more-like-this"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>MoreLikeThis - 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-guide21-morelikethis\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MoreLikeThis - Ultimate Solr Guide - Aeologic Blog\" \/>\n<meta property=\"og:description\" content=\"The&nbsp;MoreLikeThis&nbsp;search component enables users to query for documents similar to a document in their result list. It does this by using terms from the original document to find similar documents in the index. There are three ways to use MoreLikeThis. The first, and most common, is to use it as a request handler. In this case, you would send text to the MoreLikeThis request handler as needed (as in when a user clicked on a &#8220;similar documents&#8221; link). The second is to use it as a search component. This is less desirable since it performs the MoreLikeThis analysis on every document returned. This may slow search results. The final approach is to use it as a request handler but with externally supplied text. This case, also referred to as the MoreLikeThisHandler, will supply information about similar documents in the index based on the text of the input document. How MoreLikeThis Works MoreLikeThis&nbsp;constructs a Lucene query based on terms in a document. It does this by pulling terms from the defined list of fields ( see the&nbsp;mlt.fl&nbsp;parameter, below). For best results, the fields should have stored term vectors in&nbsp;schema.xml. For example: If term vectors are not stored,&nbsp;MoreLikeThis&nbsp;will generate terms from stored fields. A&nbsp;uniqueKey&nbsp;must also be stored in order for MoreLikeThis to work properly. The next phase filters terms from the original document using thresholds defined with the MoreLikeThis parameters. Finally, a query is run with these terms, and any other query parameters that have been defined (see the&nbsp;mlt.qf&nbsp;parameter, below) and a new document set is returned. Common Parameters for MoreLikeThis The table below summarizes the&nbsp;MoreLikeThis&nbsp;parameters supported by Lucene\/Solr. These parameters can be used with any of the three possible MoreLikeThis approaches.mlt.flSpecifies the fields to use for similarity. If possible, these should have stored&nbsp;termVectors.mlt.mintfSpecifies the Minimum Term Frequency, the frequency below which terms will be ignored in the source document.mlt.mindfSpecifies the Minimum Document Frequency, the frequency at which words will be ignored which do not occur in at least this many documents.mlt.maxdfSpecifies the Maximum Document Frequency, the frequency at which words will be ignored which occur in more than this many documents.mlt.maxdfpctSpecifies the Maximum Document Frequency using a relative ratio to the number of documents in the index. The argument must be an integer between 0 and 100. For example 75 means the word will be ignored if it occurs in more than 75 percent of the documents in the index.mlt.minwlSets the minimum word length below which words will be ignored.mlt.maxwlSets the maximum word length above which words will be ignored.mlt.maxqtSets the maximum number of query terms that will be included in any generated query.mlt.maxntpSets the maximum number of tokens to parse in each example document field that is not stored with TermVector support.mlt.boostSpecifies if the query will be boosted by the interesting term relevance. It can be either &#8220;true&#8221; or &#8220;false&#8221;.mlt.qfQuery fields and their boosts using the same format as that used by the&nbsp;DisMax Query Parser. These fields must also be specified in&nbsp;mlt.fl. Parameters for the MoreLikeThisComponent Using MoreLikeThis as a search component returns similar documents for each document in the response set. In addition to the common parameters, these additional options are available:mltIf set to&nbsp;true, activates the&nbsp;MoreLikeThis&nbsp;component and enables Solr to return&nbsp;MoreLikeThis&nbsp;results.mlt.countSpecifies the number of similar documents to be returned for each result. The default value is 5.mlt.interestingTermsSame as defined below for the MLT Handler. Parameters for the MoreLikeThisHandler The table below summarizes parameters accessible through the&nbsp;MoreLikeThisHandler. It supports faceting, paging, and filtering using common query parameters, but does not work well with alternate query parsers.mlt.match.includeSpecifies whether or not the response should include the matched document. If set to false, the response will look like a normal select response.mlt.match.offsetSpecifies an offset into the main query search results to locate the document on which the&nbsp;MoreLikeThis&nbsp;query should operate. By default, the query operates on the first result for the q parameter.mlt.interestingTermsControls how the&nbsp;MoreLikeThis&nbsp;component presents the &#8220;interesting&#8221; terms (the top TF\/IDF terms) for the query. It supports three settings: The setting&nbsp;list&nbsp;lists the terms. The setting&nbsp;none&nbsp;lists no terms. The setting&nbsp;details&nbsp;lists the terms along with the boost value used for each term. Unless&nbsp;mlt.boost=true, all terms will have&nbsp;boost=1.0. MoreLikeThis Query Parser The&nbsp;mlt&nbsp;query parser provides a mechanism to retrieve documents similar to a given document, like the handler. More information on the usage of the mlt query parser can be found in the section&nbsp;Other Parsers. This is it for today, stay tuned for more informative posts in future.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide21-morelikethis\/\" \/>\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=\"2020-06-08T04:52:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-06-18T12:22:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.aeologic.com\/blog\/wp-content\/uploads\/2020\/06\/MorelikeThis-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1080\" \/>\n\t<meta property=\"og:image:height\" content=\"622\" \/>\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-guide21-morelikethis\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide21-morelikethis\/\"},\"author\":{\"name\":\"Manoj Kumar\",\"@id\":\"https:\/\/www.aeologic.com\/blog\/#\/schema\/person\/13549984ba8e5f441cc733ed20d7daa4\"},\"headline\":\"MoreLikeThis &#8211; Ultimate Solr Guide\",\"datePublished\":\"2020-06-08T04:52:34+00:00\",\"dateModified\":\"2020-06-18T12:22:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide21-morelikethis\/\"},\"wordCount\":803,\"publisher\":{\"@id\":\"https:\/\/www.aeologic.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide21-morelikethis\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.aeologic.com\/blog\/wp-content\/uploads\/2020\/06\/MorelikeThis-1.png\",\"keywords\":[\"more like this\"],\"articleSection\":[\"Solr\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide21-morelikethis\/\",\"url\":\"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide21-morelikethis\/\",\"name\":\"MoreLikeThis - Ultimate Solr Guide - Aeologic Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.aeologic.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide21-morelikethis\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide21-morelikethis\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.aeologic.com\/blog\/wp-content\/uploads\/2020\/06\/MorelikeThis-1.png\",\"datePublished\":\"2020-06-08T04:52:34+00:00\",\"dateModified\":\"2020-06-18T12:22:44+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide21-morelikethis\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide21-morelikethis\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide21-morelikethis\/#primaryimage\",\"url\":\"https:\/\/www.aeologic.com\/blog\/wp-content\/uploads\/2020\/06\/MorelikeThis-1.png\",\"contentUrl\":\"https:\/\/www.aeologic.com\/blog\/wp-content\/uploads\/2020\/06\/MorelikeThis-1.png\",\"width\":1080,\"height\":622},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide21-morelikethis\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.aeologic.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MoreLikeThis &#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":"MoreLikeThis - 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-guide21-morelikethis\/","og_locale":"en_US","og_type":"article","og_title":"MoreLikeThis - Ultimate Solr Guide - Aeologic Blog","og_description":"The&nbsp;MoreLikeThis&nbsp;search component enables users to query for documents similar to a document in their result list. It does this by using terms from the original document to find similar documents in the index. There are three ways to use MoreLikeThis. The first, and most common, is to use it as a request handler. In this case, you would send text to the MoreLikeThis request handler as needed (as in when a user clicked on a &#8220;similar documents&#8221; link). The second is to use it as a search component. This is less desirable since it performs the MoreLikeThis analysis on every document returned. This may slow search results. The final approach is to use it as a request handler but with externally supplied text. This case, also referred to as the MoreLikeThisHandler, will supply information about similar documents in the index based on the text of the input document. How MoreLikeThis Works MoreLikeThis&nbsp;constructs a Lucene query based on terms in a document. It does this by pulling terms from the defined list of fields ( see the&nbsp;mlt.fl&nbsp;parameter, below). For best results, the fields should have stored term vectors in&nbsp;schema.xml. For example: If term vectors are not stored,&nbsp;MoreLikeThis&nbsp;will generate terms from stored fields. A&nbsp;uniqueKey&nbsp;must also be stored in order for MoreLikeThis to work properly. The next phase filters terms from the original document using thresholds defined with the MoreLikeThis parameters. Finally, a query is run with these terms, and any other query parameters that have been defined (see the&nbsp;mlt.qf&nbsp;parameter, below) and a new document set is returned. Common Parameters for MoreLikeThis The table below summarizes the&nbsp;MoreLikeThis&nbsp;parameters supported by Lucene\/Solr. These parameters can be used with any of the three possible MoreLikeThis approaches.mlt.flSpecifies the fields to use for similarity. If possible, these should have stored&nbsp;termVectors.mlt.mintfSpecifies the Minimum Term Frequency, the frequency below which terms will be ignored in the source document.mlt.mindfSpecifies the Minimum Document Frequency, the frequency at which words will be ignored which do not occur in at least this many documents.mlt.maxdfSpecifies the Maximum Document Frequency, the frequency at which words will be ignored which occur in more than this many documents.mlt.maxdfpctSpecifies the Maximum Document Frequency using a relative ratio to the number of documents in the index. The argument must be an integer between 0 and 100. For example 75 means the word will be ignored if it occurs in more than 75 percent of the documents in the index.mlt.minwlSets the minimum word length below which words will be ignored.mlt.maxwlSets the maximum word length above which words will be ignored.mlt.maxqtSets the maximum number of query terms that will be included in any generated query.mlt.maxntpSets the maximum number of tokens to parse in each example document field that is not stored with TermVector support.mlt.boostSpecifies if the query will be boosted by the interesting term relevance. It can be either &#8220;true&#8221; or &#8220;false&#8221;.mlt.qfQuery fields and their boosts using the same format as that used by the&nbsp;DisMax Query Parser. These fields must also be specified in&nbsp;mlt.fl. Parameters for the MoreLikeThisComponent Using MoreLikeThis as a search component returns similar documents for each document in the response set. In addition to the common parameters, these additional options are available:mltIf set to&nbsp;true, activates the&nbsp;MoreLikeThis&nbsp;component and enables Solr to return&nbsp;MoreLikeThis&nbsp;results.mlt.countSpecifies the number of similar documents to be returned for each result. The default value is 5.mlt.interestingTermsSame as defined below for the MLT Handler. Parameters for the MoreLikeThisHandler The table below summarizes parameters accessible through the&nbsp;MoreLikeThisHandler. It supports faceting, paging, and filtering using common query parameters, but does not work well with alternate query parsers.mlt.match.includeSpecifies whether or not the response should include the matched document. If set to false, the response will look like a normal select response.mlt.match.offsetSpecifies an offset into the main query search results to locate the document on which the&nbsp;MoreLikeThis&nbsp;query should operate. By default, the query operates on the first result for the q parameter.mlt.interestingTermsControls how the&nbsp;MoreLikeThis&nbsp;component presents the &#8220;interesting&#8221; terms (the top TF\/IDF terms) for the query. It supports three settings: The setting&nbsp;list&nbsp;lists the terms. The setting&nbsp;none&nbsp;lists no terms. The setting&nbsp;details&nbsp;lists the terms along with the boost value used for each term. Unless&nbsp;mlt.boost=true, all terms will have&nbsp;boost=1.0. MoreLikeThis Query Parser The&nbsp;mlt&nbsp;query parser provides a mechanism to retrieve documents similar to a given document, like the handler. More information on the usage of the mlt query parser can be found in the section&nbsp;Other Parsers. This is it for today, stay tuned for more informative posts in future.","og_url":"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide21-morelikethis\/","og_site_name":"Aeologic Blog","article_publisher":"https:\/\/www.facebook.com\/AeoLogicTech\/","article_published_time":"2020-06-08T04:52:34+00:00","article_modified_time":"2020-06-18T12:22:44+00:00","og_image":[{"width":1080,"height":622,"url":"https:\/\/www.aeologic.com\/blog\/wp-content\/uploads\/2020\/06\/MorelikeThis-1.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-guide21-morelikethis\/#article","isPartOf":{"@id":"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide21-morelikethis\/"},"author":{"name":"Manoj Kumar","@id":"https:\/\/www.aeologic.com\/blog\/#\/schema\/person\/13549984ba8e5f441cc733ed20d7daa4"},"headline":"MoreLikeThis &#8211; Ultimate Solr Guide","datePublished":"2020-06-08T04:52:34+00:00","dateModified":"2020-06-18T12:22:44+00:00","mainEntityOfPage":{"@id":"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide21-morelikethis\/"},"wordCount":803,"publisher":{"@id":"https:\/\/www.aeologic.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide21-morelikethis\/#primaryimage"},"thumbnailUrl":"https:\/\/www.aeologic.com\/blog\/wp-content\/uploads\/2020\/06\/MorelikeThis-1.png","keywords":["more like this"],"articleSection":["Solr"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide21-morelikethis\/","url":"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide21-morelikethis\/","name":"MoreLikeThis - Ultimate Solr Guide - Aeologic Blog","isPartOf":{"@id":"https:\/\/www.aeologic.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide21-morelikethis\/#primaryimage"},"image":{"@id":"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide21-morelikethis\/#primaryimage"},"thumbnailUrl":"https:\/\/www.aeologic.com\/blog\/wp-content\/uploads\/2020\/06\/MorelikeThis-1.png","datePublished":"2020-06-08T04:52:34+00:00","dateModified":"2020-06-18T12:22:44+00:00","breadcrumb":{"@id":"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide21-morelikethis\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide21-morelikethis\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide21-morelikethis\/#primaryimage","url":"https:\/\/www.aeologic.com\/blog\/wp-content\/uploads\/2020\/06\/MorelikeThis-1.png","contentUrl":"https:\/\/www.aeologic.com\/blog\/wp-content\/uploads\/2020\/06\/MorelikeThis-1.png","width":1080,"height":622},{"@type":"BreadcrumbList","@id":"https:\/\/www.aeologic.com\/blog\/ultimate-solr-guide21-morelikethis\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.aeologic.com\/blog\/"},{"@type":"ListItem","position":2,"name":"MoreLikeThis &#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\/1327","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=1327"}],"version-history":[{"count":0,"href":"https:\/\/www.aeologic.com\/blog\/wp-json\/wp\/v2\/posts\/1327\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.aeologic.com\/blog\/wp-json\/wp\/v2\/media\/1375"}],"wp:attachment":[{"href":"https:\/\/www.aeologic.com\/blog\/wp-json\/wp\/v2\/media?parent=1327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aeologic.com\/blog\/wp-json\/wp\/v2\/categories?post=1327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aeologic.com\/blog\/wp-json\/wp\/v2\/tags?post=1327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}