{"id":46,"date":"2014-05-14T08:05:00","date_gmt":"2014-05-14T08:05:00","guid":{"rendered":"https:\/\/scgindia.in\/lhotsetechnologies\/dev\/2014\/05\/14\/how-to-query-apache-solr\/"},"modified":"2020-01-17T07:55:55","modified_gmt":"2020-01-17T07:55:55","slug":"how-to-query-apache-solr","status":"publish","type":"post","link":"https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/","title":{"rendered":"How to Query Apache Solr"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left;\">\n<div style=\"text-align: justify;\">In this post I will show how to query Apache Solr using its Dashboard screen. This query can be done using Java HttpClient lib, curl request as well. But as I am giving intro to Solr dashboard in my last four posts, so I try to fire different kinds of query using it&#8217;s dashboard screen. We will do all these stuff using java code as well in my next post.<\/div>\n<p><b><br \/>\n<\/b><b>Let&#8217;s update your schema.xml file with given mappings &amp; start your Apache Solr Server &#8211;<\/b><br \/>\n<b><br \/>\n<\/b><\/p>\n<p style=\"color: #660000; font-size: 14px;\">\n&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243; ?&gt;<br \/>\n&lt;schema name=&#8221;example core zero&#8221; version=&#8221;1.1&#8243;&gt;<br \/>\n&lt;fields&gt; &lt;field name=&#8221;_version_&#8221; type=&#8221;long&#8221; indexed=&#8221;true&#8221; stored=&#8221;true&#8221;\/&gt;<br \/>\n&lt;field name=&#8221;_root_&#8221; type=&#8221;string&#8221; indexed=&#8221;false&#8221; stored=&#8221;false&#8221;\/&gt;<br \/>\n&lt;field name=&#8221;id&#8221; type=&#8221;string&#8221; indexed=&#8221;true&#8221; stored=&#8221;true&#8221; required=&#8221;true&#8221; \/&gt;<br \/>\n&lt;field name=&#8221;name&#8221; type=&#8221;string&#8221; indexed=&#8221;true&#8221; stored=&#8221;true&#8221; \/&gt;<br \/>\n&lt;field name=&#8221;address&#8221; type=&#8221;string&#8221; indexed=&#8221;true&#8221; stored=&#8221;true&#8221; \/&gt;<br \/>\n&lt;field name=&#8221;comments&#8221; type=&#8221;string&#8221; indexed=&#8221;true&#8221; stored=&#8221;true&#8221; \/&gt;<br \/>\n&lt;field name=&#8221;text&#8221; type=&#8221;string&#8221; indexed=&#8221;true&#8221; stored=&#8221;false&#8221; multiValued=&#8221;true&#8221;\/&gt;<br \/>\n&lt;field name=&#8221;popularity&#8221; type=&#8221;long&#8221; indexed=&#8221;true&#8221; stored=&#8221;true&#8221; multiValued=&#8221;false&#8221;\/&gt;<br \/>\n&lt;field name=&#8221;counts&#8221; type=&#8221;long&#8221; indexed=&#8221;true&#8221; stored=&#8221;true&#8221; \/&gt;<br \/>\n&lt;dynamicField name=&#8221;*_i&#8221; type=&#8221;string&#8221; indexed=&#8221;true&#8221; stored=&#8221;true&#8221; \/&gt;<br \/>\n&lt;\/fields&gt; &lt;uniqueKey&gt;id&lt;\/uniqueKey&gt; &lt;copyField source=&#8221;name&#8221; dest=&#8221;text&#8221;\/&gt;<br \/>\n&lt;copyField source=&#8221;address&#8221; dest=&#8221;text&#8221;\/&gt; &lt;copyField source=&#8221;comments&#8221; dest=&#8221;text&#8221;\/&gt;<br \/>\n&lt;types&gt; &lt;fieldtype name=&#8221;string&#8221; class=&#8221;solr.StrField&#8221; sortMissingLast=&#8221;true&#8221; omitNorms=&#8221;true&#8221;\/&gt;<br \/>\n&lt;fieldType name=&#8221;long&#8221; class=&#8221;solr.TrieLongField&#8221; precisionStep=&#8221;0&#8243; positionIncrementGap=&#8221;0&#8243;\/&gt;<br \/>\n&lt;\/types&gt;<br \/>\n&lt;\/schema&gt;<\/p>\n<p>It&#8217;s time to add more records on Apache Solr. Go to &#8211;<br \/>\n<b>Solr Dashboard -&gt;Select Collection1-&gt; Documents&nbsp;<\/b><br \/>\n&amp; save all of these records <b>one by one.<\/b><br \/>\n<span style=\"color: #660000; font-size: 14px;\">{<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;id&#8221;: &#8220;Solr101&#8221;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;name&#8221;:&#8221;Solr version 4.7.2&#8243;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;address&#8221;:&#8221;House No &#8211; 100, LR Apache, 40702&#8243;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;comments&#8221;: &#8220;Apache Solr It&#8217;s Cool.&#8221;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;popularity&#8221;:10,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;counts&#8221;:140,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;dynamicField_i&#8221;: &#8220;It is dynamically genrated field.&#8221; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\">}<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\">{<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;id&#8221;: &#8220;Solr102&#8221;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;name&#8221;:&#8221;Solr SECOND RECORD&#8221;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;address&#8221;:&#8221;SECOND RECORD ADDRESS&#8221;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;comments&#8221;: &#8220;RECORDS FOR TESTING PURPOSE&#8221;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;popularity&#8221;:10,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;counts&#8221;:340,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;dynamicField_i&#8221;: &#8220;It is dynamically genrated field FOR SECOND RECORD.&#8221; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\">}<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\">{<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;id&#8221;: &#8220;Solr103&#8221;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;name&#8221;:&#8221;Solr THIRD RECORD&#8221;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;address&#8221;:&#8221;THIRD RECORD ADDRESS&#8221;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;comments&#8221;: &#8220;RECORDS FOR TESTING PURPOSE&#8221;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;popularity&#8221;:1,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;counts&#8221;:40,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;dynamicField_i&#8221;: &#8220;It is dynamically genrated field FOR THIRD RECORD.&#8221; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\">}<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\">{<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;id&#8221;: &#8220;Solr104&#8221;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;name&#8221;:&#8221;Solr FOURTH RECORD&#8221;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;address&#8221;:&#8221;FOURTH RECORD ADDRESS&#8221;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;comments&#8221;: &#8220;RECORDS FOR TESTING PURPOSE&#8221;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;popularity&#8221;:6,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;counts&#8221;:400,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;dynamicField_i&#8221;: &#8220;It is dynamically genrated field FOR FOURTH RECORDS.&#8221; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\">}<\/span><br \/>\nScreen Shot &#8211;<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"clear: left; float: left; margin-bottom: 1em; margin-right: 1em;\" href=\"http:\/\/3.bp.blogspot.com\/-xx3UspN3tPE\/U3MX1nx8ldI\/AAAAAAAAAlc\/tkJ01MId_iQ\/s1600\/doucmentUpdate.jpg\"><img fetchpriority=\"high\" decoding=\"async\" src=\"http:\/\/3.bp.blogspot.com\/-xx3UspN3tPE\/U3MX1nx8ldI\/AAAAAAAAAlc\/tkJ01MId_iQ\/s1600\/doucmentUpdate.jpg\" width=\"640\" height=\"360\" border=\"0\"><\/a><\/div>\n<p><span style=\"font-size: 14px;\">&nbsp;<\/span><\/p>\n<div style=\"clear: both; text-align: center;\">&nbsp;<\/div>\n<div style=\"text-align: justify;\">Go to query tag &amp; click on execute Query you will get-<\/div>\n<div style=\"clear: both; text-align: center;\"><a style=\"clear: left; float: left; margin-bottom: 1em; margin-right: 1em;\" href=\"http:\/\/4.bp.blogspot.com\/-29ilTH7hpX0\/U3MYJOJ9PfI\/AAAAAAAAAlk\/HAiJXNgsCp0\/s1600\/queryScreen.jpg\"><img decoding=\"async\" src=\"http:\/\/4.bp.blogspot.com\/-29ilTH7hpX0\/U3MYJOJ9PfI\/AAAAAAAAAlk\/HAiJXNgsCp0\/s1600\/queryScreen.jpg\" width=\"640\" height=\"360\" border=\"0\"><\/a><\/div>\n<div style=\"clear: both; text-align: justify;\">This screen have lot of text fields, I am going to introduce all of them.<\/div>\n<div style=\"clear: both; text-align: justify;\">&nbsp;<\/div>\n<div style=\"clear: both; text-align: justify;\"><b>q Field (Stands for Query default *:*)<\/b><\/div>\n<div style=\"clear: both; text-align: justify;\"><b>First *<\/b> notation <b>denotes<\/b> the <b>&lt;field Name&gt;<\/b> &amp;&nbsp;<\/div>\n<div style=\"clear: both; text-align: justify;\"><b>Second *<\/b> <b>denotes<\/b> the <b>text to be search<\/b> in that field.<\/div>\n<div style=\"clear: both; text-align: justify;\"><b>Ex.&nbsp;<\/b>Type <b>id:Solr102 <\/b>&nbsp;in this textbox and <b>click<\/b> on <b>Execute Query button<\/b>, Solr will search &#8220;<b>Solr102<\/b>&nbsp;&#8220;string in <b>&lt;id&gt;<\/b> <b>field<\/b> and returns you all the results matching this criteria.<\/div>\n<div style=\"clear: both; text-align: justify;\">&nbsp;<\/div>\n<div style=\"clear: both; text-align: justify;\"><b>fq Field stands for (Filter Query)<\/b><\/div>\n<div style=\"clear: both; text-align: justify;\">This is used as a query filter &amp; imposes more restriction on the parent query string provided by you. This Filter response is stored in cache separately so if you hit this filter query as a main query then it&#8217;s result will be return from the cached output.<\/div>\n<div style=\"clear: both; text-align: justify;\"><b>fq<\/b>&nbsp;parameter can be specified multiple times by pressing &#8220;+&#8221; sign at the right of the text box. Serch response will be generated after the intersection of these multiple parameters. ex.<\/div>\n<div style=\"clear: both; text-align: justify;\"><b>fq=popularity:10&nbsp;<\/b><\/div>\n<div style=\"clear: both; text-align: justify;\"><b>fq=counts:140<\/b><\/div>\n<div style=\"clear: both; text-align: justify;\">It will fetch the records where <b>popularity<\/b> is <b>10<\/b> and <b>counts<\/b> is <b>140<\/b>. It can be written into single query is<\/div>\n<div style=\"clear: both; text-align: justify;\"><b>fq=+&nbsp;popularity:10+counts:140<\/b><\/div>\n<div style=\"clear: both; text-align: justify;\">as shown below &#8211;&nbsp;<\/div>\n<div style=\"clear: both; text-align: center;\"><a style=\"clear: left; float: left; margin-bottom: 1em; margin-right: 1em;\" href=\"http:\/\/4.bp.blogspot.com\/-dwXjQ8PMmQQ\/U3MZ7EkbyhI\/AAAAAAAAAlw\/4VYAb2w4bJo\/s1600\/fq.jpg\"><img decoding=\"async\" src=\"http:\/\/4.bp.blogspot.com\/-dwXjQ8PMmQQ\/U3MZ7EkbyhI\/AAAAAAAAAlw\/4VYAb2w4bJo\/s1600\/fq.jpg\" width=\"640\" height=\"360\" border=\"0\"><\/a><\/div>\n<div style=\"clear: both; text-align: justify;\">In this screen shot <b>top right corner<\/b> have a <b>link<\/b> as <b>highlighted<\/b> in this image just <b>click<\/b> on this <b>link<\/b> it will open a new browser tab &amp; show you the result in that tab. It means if you want to get the same result using browser window then no need to go to this Dashboard screen. You directly write your query on the browser window &amp; it will return the result of your query.<\/div>\n<div style=\"clear: both; text-align: justify;\">&nbsp;<\/div>\n<div style=\"clear: both; text-align: justify;\"><b>Sort&nbsp;<\/b><\/div>\n<div style=\"clear: both; text-align: justify;\"><b>ex.&nbsp;<\/b><b>id desc&nbsp;<\/b><\/div>\n<div style=\"clear: both; text-align: justify;\">Note here I am sorting the document on the basic of id.<\/div>\n<div style=\"clear: both; text-align: justify;\"><b>Note :- syntex for declaration is &lt;fieldName&gt;&lt;space&gt;&lt;Sorting Order i.e. asc or desc&gt;<\/b><\/div>\n<div style=\"clear: both; text-align: justify;\">you can have multiple sorting order. Let&#8217;s consider you have 3 sorting order then second is evaluated only when there ijs conflict in first sorting order and third sorting order will be evaluated only when first and second sorting order produces any conflict.<\/div>\n<div style=\"clear: both; text-align: justify;\">&nbsp;<\/div>\n<div style=\"clear: both; text-align: justify;\"><b>Start,rows<\/b><\/div>\n<div style=\"clear: both; text-align: justify;\">Starts is from where the fetching of the records should be done. rows means number of records to be fetched. ex.<\/div>\n<div style=\"clear: both; text-align: justify;\"><b>if start=10, rows=20<\/b><\/div>\n<div style=\"clear: both; text-align: justify;\">then it will fetch records from 10th to 29th.<\/div>\n<div style=\"clear: both; text-align: justify;\">&nbsp;<\/div>\n<div style=\"clear: both; text-align: justify;\"><b>fl (stands for field list)<\/b><\/div>\n<div style=\"clear: both; text-align: justify;\">It will restrict the number of fields returned from the Apache Solr. These fields can be defined using comma separation.<\/div>\n<div style=\"clear: both; text-align: justify;\"><b>Ex. name,address&nbsp;<\/b><\/div>\n<div style=\"clear: both; text-align: justify;\">it will show only the name and address field returned from in response.<\/div>\n<div style=\"clear: both; text-align: justify;\">screen shot &#8211;&nbsp;<\/div>\n<div style=\"clear: both; text-align: center;\"><a style=\"clear: left; float: left; margin-bottom: 1em; margin-right: 1em;\" href=\"http:\/\/3.bp.blogspot.com\/-J4LKmsCup10\/U3Mbjk5j9yI\/AAAAAAAAAl8\/_JdfnUAbzuA\/s1600\/fl.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/3.bp.blogspot.com\/-J4LKmsCup10\/U3Mbjk5j9yI\/AAAAAAAAAl8\/_JdfnUAbzuA\/s1600\/fl.jpg\" width=\"640\" height=\"360\" border=\"0\"><\/a><\/div>\n<div style=\"clear: both; text-align: justify;\"><b>Name aliasing<\/b> can also be done as<\/div>\n<div style=\"clear: both; text-align: justify;\"><b>id,UserName:name<\/b>&nbsp;<\/div>\n<div style=\"clear: both; text-align: justify;\"><b>Syntex- &lt;Alias Name&gt; : &lt;fieldName&gt;<\/b><\/div>\n<div style=\"clear: both; text-align: justify;\">here Solr will return the result with two fields one is id and second is <b>UserName<\/b> which is used as a alias of <b>&lt;name&gt; field<\/b>.<\/div>\n<div style=\"clear: both; text-align: justify;\">screen shot-<\/div>\n<div style=\"clear: both; text-align: center;\"><a style=\"clear: left; float: left; margin-bottom: 1em; margin-right: 1em;\" href=\"http:\/\/4.bp.blogspot.com\/-r01_dcxb3VY\/U3McQ9-DUWI\/AAAAAAAAAmE\/dF95t6qvLOM\/s1600\/aliase.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/4.bp.blogspot.com\/-r01_dcxb3VY\/U3McQ9-DUWI\/AAAAAAAAAmE\/dF95t6qvLOM\/s1600\/aliase.jpg\" width=\"640\" height=\"360\" border=\"0\"><\/a><\/div>\n<div style=\"clear: both; text-align: justify;\">you can also use * annotation from returning the result as<\/div>\n<div style=\"clear: both; text-align: justify;\"><b>id,add*<\/b><\/div>\n<div style=\"clear: both; text-align: justify;\"><b>description- <\/b>It will <b>return<\/b> id and all those fields which are <b>started<\/b> from <b>&#8220;add&#8221;<\/b> string.<\/div>\n<div style=\"clear: both; text-align: center;\"><a style=\"clear: left; float: left; margin-bottom: 1em; margin-right: 1em;\" href=\"http:\/\/1.bp.blogspot.com\/-fCBPbm6Et-w\/U3MelYVClNI\/AAAAAAAAAm0\/c9MV_zT4Kdc\/s1600\/notation.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/1.bp.blogspot.com\/-fCBPbm6Et-w\/U3MelYVClNI\/AAAAAAAAAm0\/c9MV_zT4Kdc\/s1600\/notation.jpg\" width=\"640\" height=\"360\" border=\"0\"><\/a><\/div>\n<div style=\"clear: both; text-align: justify;\"><b>Function in response as<\/b><\/div>\n<div style=\"clear: both; text-align: justify;\"><b>id, reviews:sum(popularity,counts)<\/b><\/div>\n<div style=\"clear: both; text-align: justify;\"><b>description- <\/b>It will return two fields as id and second is prise which is sum of popularity with itself.<\/div>\n<div style=\"clear: both; text-align: center;\"><a style=\"clear: left; float: left; margin-bottom: 1em; margin-right: 1em;\" href=\"http:\/\/2.bp.blogspot.com\/-Wrsngn6F6uY\/U3MdpquaqVI\/AAAAAAAAAmk\/XxVwalih6HM\/s1600\/function.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/2.bp.blogspot.com\/-Wrsngn6F6uY\/U3MdpquaqVI\/AAAAAAAAAmk\/XxVwalih6HM\/s1600\/function.jpg\" width=\"640\" height=\"360\" border=\"0\"><\/a><\/div>\n<div style=\"clear: both; text-align: justify;\"><b>df (Defined Fields)<\/b><\/div>\n<div style=\"clear: both; text-align: justify;\">Here all the fields are separated by comma and this field is used for search purpose. i.e<\/div>\n<div style=\"clear: both; text-align: justify;\">if you only enter the text in search query section<b> (q section)<\/b> and defined some fields in <b>df textbox<\/b> then Solr search that text only in these defined fields not in any other field.<\/div>\n<div style=\"clear: both; text-align: justify;\"><b>Ex. type Solr104 in q section<\/b><\/div>\n<div style=\"clear: both; text-align: justify;\"><b>and type id in df field will search Solr104 in df field.<\/b><\/div>\n<div style=\"clear: both; text-align: center;\"><a style=\"clear: left; float: left; margin-bottom: 1em; margin-right: 1em;\" href=\"http:\/\/1.bp.blogspot.com\/-MU4zu3Zhtgs\/U3MfD8fcZfI\/AAAAAAAAAm8\/0aNcNE7JcWA\/s1600\/df.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/1.bp.blogspot.com\/-MU4zu3Zhtgs\/U3MfD8fcZfI\/AAAAAAAAAm8\/0aNcNE7JcWA\/s1600\/df.jpg\" width=\"640\" height=\"360\" border=\"0\"><\/a><\/div>\n<div style=\"clear: both; text-align: justify;\"><b>omitHeader (default value false)<\/b><\/div>\n<div style=\"clear: both; text-align: justify;\">How to omit header from the response return from the Apache Solr<\/div>\n<div style=\"clear: both; text-align: justify;\"><b>If omitHeader=true&nbsp;<\/b><\/div>\n<div style=\"clear: both; text-align: justify;\"><b>Ex. <\/b>hit given URL in your browser&#8217;s window you will get a response without addition details.<\/div>\n<div style=\"clear: both; text-align: justify;\"><b>&nbsp;<\/b><a style=\"text-align: left;\" href=\"http:\/\/localhost:8983\/solr\/collection1\/select?q=Solr104&amp;df=id&amp;wt=json&amp;indent=true&amp;omitHeader=true\"><span style=\"font-size: 14px;\">http:\/\/localhost:8983\/solr\/collection1\/select?q=Solr104&amp;df=id&amp;wt=json&amp;indent=true&amp;omitHeader=true<\/span><\/a><\/div>\n<div style=\"clear: both; text-align: justify;\"><a style=\"clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em; text-align: center;\" href=\"http:\/\/2.bp.blogspot.com\/-yBHyLZHuy4g\/U3Mfoq7cDeI\/AAAAAAAAAnE\/yyxayvl-SYA\/s1600\/omitHeader.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/2.bp.blogspot.com\/-yBHyLZHuy4g\/U3Mfoq7cDeI\/AAAAAAAAAnE\/yyxayvl-SYA\/s1600\/omitHeader.jpg\" width=\"640\" height=\"360\" border=\"0\"><\/a><\/div>\n<div style=\"clear: both; text-align: justify;\"><b>debug(default false)<\/b><\/div>\n<div style=\"clear: both; text-align: justify;\">you can debug your query by using this parameter.<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p><strong>Happy Coding<\/strong><br \/>\n<strong>Namah Shivay<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this post I will show how to query Apache Solr using its Dashboard screen. This query can be done [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[154,153,152],"tags":[],"class_list":["post-46","post","type-post","status-publish","format-standard","hentry","category-apache-solr","category-query-to-apache-solr","category-solr"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Query Apache Solr - AEM Blog | Lhotse Technologies<\/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:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Query Apache Solr - AEM Blog | Lhotse Technologies\" \/>\n<meta property=\"og:description\" content=\"In this post I will show how to query Apache Solr using its Dashboard screen. This query can be done [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/\" \/>\n<meta property=\"og:site_name\" content=\"AEM Blog | Lhotse Technologies\" \/>\n<meta property=\"article:published_time\" content=\"2014-05-14T08:05:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-01-17T07:55:55+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/3.bp.blogspot.com\/-xx3UspN3tPE\/U3MX1nx8ldI\/AAAAAAAAAlc\/tkJ01MId_iQ\/s1600\/doucmentUpdate.jpg\" \/>\n<meta name=\"author\" content=\"Team Lhotse\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Team Lhotse\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/\"},\"author\":{\"name\":\"Team Lhotse\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/person\/fd7bee89b050d7c7195fc75b681b053d\"},\"headline\":\"How to Query Apache Solr\",\"datePublished\":\"2014-05-14T08:05:00+00:00\",\"dateModified\":\"2020-01-17T07:55:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/\"},\"wordCount\":1149,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/3.bp.blogspot.com\/-xx3UspN3tPE\/U3MX1nx8ldI\/AAAAAAAAAlc\/tkJ01MId_iQ\/s1600\/doucmentUpdate.jpg\",\"articleSection\":[\"Apache Solr\",\"Query to apache solr\",\"Solr\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/\",\"url\":\"https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/\",\"name\":\"How to Query Apache Solr - AEM Blog | Lhotse Technologies\",\"isPartOf\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/3.bp.blogspot.com\/-xx3UspN3tPE\/U3MX1nx8ldI\/AAAAAAAAAlc\/tkJ01MId_iQ\/s1600\/doucmentUpdate.jpg\",\"datePublished\":\"2014-05-14T08:05:00+00:00\",\"dateModified\":\"2020-01-17T07:55:55+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/#primaryimage\",\"url\":\"http:\/\/3.bp.blogspot.com\/-xx3UspN3tPE\/U3MX1nx8ldI\/AAAAAAAAAlc\/tkJ01MId_iQ\/s1600\/doucmentUpdate.jpg\",\"contentUrl\":\"http:\/\/3.bp.blogspot.com\/-xx3UspN3tPE\/U3MX1nx8ldI\/AAAAAAAAAlc\/tkJ01MId_iQ\/s1600\/doucmentUpdate.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/lhotsetechnologies.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Query Apache Solr\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#website\",\"url\":\"https:\/\/lhotsetechnologies.com\/blog\/\",\"name\":\"AEM Blog | Lhotse Technologies\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/lhotsetechnologies.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#organization\",\"name\":\"AEM Blog | Lhotse Technologies\",\"url\":\"https:\/\/lhotsetechnologies.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/lhotsetechnologies.com\/blog\/wp-content\/uploads\/2019\/07\/lhotse-logo.png\",\"contentUrl\":\"https:\/\/lhotsetechnologies.com\/blog\/wp-content\/uploads\/2019\/07\/lhotse-logo.png\",\"width\":539,\"height\":172,\"caption\":\"AEM Blog | Lhotse Technologies\"},\"image\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/person\/fd7bee89b050d7c7195fc75b681b053d\",\"name\":\"Team Lhotse\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"caption\":\"Team Lhotse\"},\"url\":\"https:\/\/lhotsetechnologies.com\/blog\/author\/team-lhotse\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Query Apache Solr - AEM Blog | Lhotse Technologies","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:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/","og_locale":"en_US","og_type":"article","og_title":"How to Query Apache Solr - AEM Blog | Lhotse Technologies","og_description":"In this post I will show how to query Apache Solr using its Dashboard screen. This query can be done [&hellip;]","og_url":"https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/","og_site_name":"AEM Blog | Lhotse Technologies","article_published_time":"2014-05-14T08:05:00+00:00","article_modified_time":"2020-01-17T07:55:55+00:00","og_image":[{"url":"http:\/\/3.bp.blogspot.com\/-xx3UspN3tPE\/U3MX1nx8ldI\/AAAAAAAAAlc\/tkJ01MId_iQ\/s1600\/doucmentUpdate.jpg","type":"","width":"","height":""}],"author":"Team Lhotse","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Team Lhotse","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/#article","isPartOf":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/"},"author":{"name":"Team Lhotse","@id":"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/person\/fd7bee89b050d7c7195fc75b681b053d"},"headline":"How to Query Apache Solr","datePublished":"2014-05-14T08:05:00+00:00","dateModified":"2020-01-17T07:55:55+00:00","mainEntityOfPage":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/"},"wordCount":1149,"commentCount":0,"publisher":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/#organization"},"image":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/#primaryimage"},"thumbnailUrl":"http:\/\/3.bp.blogspot.com\/-xx3UspN3tPE\/U3MX1nx8ldI\/AAAAAAAAAlc\/tkJ01MId_iQ\/s1600\/doucmentUpdate.jpg","articleSection":["Apache Solr","Query to apache solr","Solr"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/","url":"https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/","name":"How to Query Apache Solr - AEM Blog | Lhotse Technologies","isPartOf":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/#primaryimage"},"image":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/#primaryimage"},"thumbnailUrl":"http:\/\/3.bp.blogspot.com\/-xx3UspN3tPE\/U3MX1nx8ldI\/AAAAAAAAAlc\/tkJ01MId_iQ\/s1600\/doucmentUpdate.jpg","datePublished":"2014-05-14T08:05:00+00:00","dateModified":"2020-01-17T07:55:55+00:00","breadcrumb":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/#primaryimage","url":"http:\/\/3.bp.blogspot.com\/-xx3UspN3tPE\/U3MX1nx8ldI\/AAAAAAAAAlc\/tkJ01MId_iQ\/s1600\/doucmentUpdate.jpg","contentUrl":"http:\/\/3.bp.blogspot.com\/-xx3UspN3tPE\/U3MX1nx8ldI\/AAAAAAAAAlc\/tkJ01MId_iQ\/s1600\/doucmentUpdate.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/lhotsetechnologies.com\/blog\/how-to-query-apache-solr\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/lhotsetechnologies.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Query Apache Solr"}]},{"@type":"WebSite","@id":"https:\/\/lhotsetechnologies.com\/blog\/#website","url":"https:\/\/lhotsetechnologies.com\/blog\/","name":"AEM Blog | Lhotse Technologies","description":"","publisher":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/lhotsetechnologies.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/lhotsetechnologies.com\/blog\/#organization","name":"AEM Blog | Lhotse Technologies","url":"https:\/\/lhotsetechnologies.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/lhotsetechnologies.com\/blog\/wp-content\/uploads\/2019\/07\/lhotse-logo.png","contentUrl":"https:\/\/lhotsetechnologies.com\/blog\/wp-content\/uploads\/2019\/07\/lhotse-logo.png","width":539,"height":172,"caption":"AEM Blog | Lhotse Technologies"},"image":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/person\/fd7bee89b050d7c7195fc75b681b053d","name":"Team Lhotse","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","caption":"Team Lhotse"},"url":"https:\/\/lhotsetechnologies.com\/blog\/author\/team-lhotse\/"}]}},"_links":{"self":[{"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/46","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/comments?post=46"}],"version-history":[{"count":7,"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/46\/revisions"}],"predecessor-version":[{"id":579,"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/46\/revisions\/579"}],"wp:attachment":[{"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=46"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=46"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=46"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}