<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>query parser &#8211; Solr.pl</title>
	<atom:link href="https://solr.pl/en/tag/query-parser/feed/" rel="self" type="application/rss+xml" />
	<link>https://solr.pl/en/</link>
	<description>All things to be found - Blog related to Apache Solr &#38; Lucene projects - https://solr.apache.org</description>
	<lastBuildDate>Sat, 14 Nov 2020 15:22:48 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>
	<item>
		<title>RankField &#038; Rank Query Parser</title>
		<link>https://solr.pl/en/2020/09/28/rankfield-rank-query-parser/</link>
					<comments>https://solr.pl/en/2020/09/28/rankfield-rank-query-parser/#respond</comments>
		
		<dc:creator><![CDATA[Rafał Kuć]]></dc:creator>
		<pubDate>Mon, 28 Sep 2020 14:22:14 +0000</pubDate>
				<category><![CDATA[Solr]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[query parser]]></category>
		<category><![CDATA[rank]]></category>
		<category><![CDATA[rankfield]]></category>
		<category><![CDATA[rankqueryparser]]></category>
		<category><![CDATA[solr]]></category>
		<guid isPermaLink="false">http://sematext.solr.pl/?p=1036</guid>

					<description><![CDATA[One of the additions to Solr that we didn&#8217;t talk about yet is the new field type called the&#160;RankField&#160;and the&#160;Rank Query Parser&#160;that can leverage it. Together they can be used to introduce scoring based on the content of the document]]></description>
										<content:encoded><![CDATA[
<p>One of the additions to Solr that we didn&#8217;t talk about yet is the new field type called the&nbsp;<strong>RankField</strong>&nbsp;and the&nbsp;<strong>Rank Query Parser</strong>&nbsp;that can leverage it. Together they can be used to introduce scoring based on the content of the document in an optimized way. Let&#8217;s have a quick look at what the mentioned pair gives us.</p>



<span id="more-1036"></span>



<h2 class="wp-block-heading">The Idea Behind Rank Query Parser</h2>



<p>The idea behind the&nbsp;<strong>Rank Query Parser</strong>&nbsp;is that it provides the functionality of using the information from the document to modify the score of the resulting documents. It provides a subset of what the&nbsp;<strong>Function Query Parser</strong>&nbsp;already provided, but it can also be used with the BlockMax-WAND algorithm for improved query performance.&nbsp;</p>



<h2 class="wp-block-heading">The RankField</h2>



<p>Using&nbsp;<strong>RankField</strong>&nbsp;is very simple. We need to define the appropriate field type, a field using that field type, and of course, populate it with data. Let&#8217;s assume we have the following document structure:</p>



<pre class="wp-block-code"><code class="">{
  "id" : 1,
  "name": "RankField and RankQueryParser",
  "type": "post",
  "views": 1000 
}</code></pre>



<p>We have the document identifier, the name of the document, its type, and the number of views. We will be interested in the last field. In addition to using it for display purposes, we would also like to use it for ranking. Our schema could look as follows:</p>



<pre class="wp-block-code"><code class="">&lt;field name="id" type="string" />
&lt;field name="name" type="text_ws" />
&lt;field name="type" type="string" />
&lt;field name="views" type="rank" /></code></pre>



<p>We also need to define the&nbsp;<strong>rank</strong>&nbsp;type, which could look as follows:</p>



<pre class="wp-block-code"><code class="">&lt;fieldType name="rank" class="solr.RankField" /></code></pre>



<p>That is everything we need &#8211; we are ready to go.</p>



<h2 class="wp-block-heading">Using the Rank Query Parser</h2>



<p>To simply use the&nbsp;<strong>RankQueryParser</strong>&nbsp;and include the&nbsp;<strong>views</strong>&nbsp;field in the scoring calculation we could run a query similar to the following one:</p>



<pre class="wp-block-code"><code class="">q=_query_:{!rank f='views' function='log'}</code></pre>



<p>Knowing that we have two documents that look as follows:</p>



<pre class="wp-block-code"><code class="">[
  {
    "id" : 1,
    "name": "RankField and RankQueryParser",
    "type": "post",
    "views": 1000 
  },
  {
    "id" : 2,
    "name": "Lucene and Solr 8.6.1 were released",
    "type": "announcement",
    "views": 10
  }
]</code></pre>



<p>Our results would look like this:</p>



<pre class="wp-block-code"><code class="">{
  "responseHeader":{
    "zkConnected":true,
    "status":0,
    "QTime":3,
    "params":{
      "q":"_query_:{!rank f='views' function='log'}",
      "fl":"score,*"}},
  "response":{"numFound":2,"start":0,"maxScore":6.908755,"numFoundExact":true,"docs":[
      {
        "id":"1",
        "name":"RankField and RankQueryParser",
        "type":"post",
        "_version_":1678886835690930176,
        "score":6.908755},
      {
        "id":"2",
        "name": "Lucene and Solr 8.6.1 were released",
        "type":"announcement",
        "_version_":1678886835758039040,
        "score":2.3978953}]
  }}</code></pre>



<p>You can see that even though we&#8217;ve run the&nbsp;<strong>match all</strong>&nbsp;query that gives a score of&nbsp;<strong>1.0</strong>&nbsp;to all matching documents, the score in our case is different. Solr took the&nbsp;<strong>log</strong>&nbsp;function and applied it to all matching results.</p>



<h2 class="wp-block-heading">Performance</h2>



<p>Of course, the above behavior can be easily achieved by using a standard&nbsp;<strong>Function Query Parser</strong>, but the key point with the&nbsp;<strong>Rank Query Parser</strong>&nbsp;is that we can use the BlockMax-WAND algorithm to improve the performance of our query. To do this we need to include the&nbsp;<strong>minExactCount</strong>&nbsp;parameter to our query to define how many accurate hits need to be present in the results. After that, Solr may skip documents that do not enter the top N results matching the query.</p>



<p>The response from Solr when&nbsp;<strong>minExactCount</strong>&nbsp;parameter is used look as follows:</p>



<pre class="wp-block-code"><code class="">{
  "responseHeader":{
    "zkConnected":true,
    "status":0,
    "QTime":1,
    "params":{
      "q":"_query_:{!rank f='views' function='log'}",
      "fl":"score,*",
      "minExactCount":"1"}},
  "response":{"numFound":2,"start":0,"maxScore":6.908755,"numFoundExact":true,"docs":[
      {
        "id":"1",
        "name":"RankField and RankQueryParser",
        "type":"post",
        "_version_":1678886835690930176,
        "score":6.908755},
      {
        "id":"2",
        "name":"Lucene and Solr 8.6.1 were released",
        "type":"announcement",
        "_version_":1678886835758039040,
        "score":2.3978953}]
  }}</code></pre>



<p>You can see an additional&nbsp;<strong>numFoundExact</strong>&nbsp;attribute in the response header. We will talk about the BlockMax-WAND algorithm in Solr in the next few weeks in a dedicated blog post, so stay tuned if you would like to read about it. There are some pros and cons to it that I think is worth discussing.&nbsp;</p>



<h2 class="wp-block-heading">Available Functions</h2>



<p>At the moment of writing the blog post there are three functions available that we can use with the&nbsp;<strong>Rank Query Parser</strong>:</p>



<ul class="wp-block-list"><li><strong>log</strong>&nbsp;&#8211; the logarithmic function, which accepts&nbsp;<strong>weight</strong>&nbsp;and&nbsp;<strong>scalingFactor</strong>&nbsp;attributes</li><li><strong>satu</strong>&nbsp;&#8211; the saturation function accepting the&nbsp;<strong>pivot</strong>&nbsp;and&nbsp;<strong>weight</strong>&nbsp;attributes</li><li><strong>sigm</strong>&nbsp;&#8211; the sigmoid function accepting the&nbsp;<strong>pivot</strong>,&nbsp;<strong>weight</strong>, and&nbsp;<strong>exponent</strong>&nbsp;attributes</li></ul>



<p>You can use one of those functions to scale the scoring factor and adjust how the rank field value affects the scoring.</p>



<h2 class="wp-block-heading">Conclusions</h2>



<p>Though we already had the ability to include the function query in our queries and use the field value from it we can now also use the BlockMax-WAND algorithm. This allows improving the query performance in situations where we don&#8217;t need the exact number of rows and we are happy with only top N results. Something worth considering.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://solr.pl/en/2020/09/28/rankfield-rank-query-parser/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Solr and available query parsers</title>
		<link>https://solr.pl/en/2013/08/19/solr-and-available-query-parsers/</link>
					<comments>https://solr.pl/en/2013/08/19/solr-and-available-query-parsers/#respond</comments>
		
		<dc:creator><![CDATA[Rafał Kuć]]></dc:creator>
		<pubDate>Mon, 19 Aug 2013 13:10:06 +0000</pubDate>
				<category><![CDATA[Solr]]></category>
		<category><![CDATA[parser]]></category>
		<category><![CDATA[query parser]]></category>
		<category><![CDATA[solr]]></category>
		<guid isPermaLink="false">http://sematext.solr.pl/?p=608</guid>

					<description><![CDATA[Every now and than there is a question appearing on the mailing list &#8211; what type of query parsers are available in Solr. So we decided to make such a list with a short description about each of the query]]></description>
										<content:encoded><![CDATA[<p>Every now and than there is a question appearing on the mailing list &#8211; what type of query parsers are available in Solr. So we decided to make such a list with a short description about each of the query parsers available. If you are interested to see what Solr has to offer, please read the rest of this post.</p>
<p><span id="more-608"></span></p>
<h3>Let&#8217;s start with the list</h3>
<p>By using the <em>defType</em> parameter during query time, we can specify which query parser should be used as the default one during query execution. However, as you&#8217;ll see in the examples this is not the only way &#8211; we can also use local params. However, before short description of each of the query parsers available in Solr we would like to list them all. In Solr 4.4 the following query parsers can be used:</p>
<ul>
<li>lucene</li>
<li>lucenePlusSort</li>
<li>func</li>
<li>prefix</li>
<li>boost</li>
<li>dismax</li>
<li>edismax</li>
<li>field</li>
<li>raw</li>
<li>term</li>
<li>query</li>
<li>frange</li>
<li>geofilt</li>
<li>bbox</li>
<li>join</li>
<li>surround</li>
<li>switch</li>
<li>maxscore</li>
</ul>
<h3>Lucene Query Parser &#8211; lucene</h3>
<p>Default query parser used by Solr that allows us to use Lucene query syntax to make queries (with some small differences that are mentioned on Solr wiki: <a href="http://wiki.apache.org/solr/SolrQuerySyntax" target="_blank" rel="noopener noreferrer">http://wiki.apache.org/solr/SolrQuerySyntax</a>). An example query made with this parser can look like this: <em>q=+title:harry +category:books</em></p>
<h3>Old Lucene Query Parser &#8211; lucenePlusSort</h3>
<p>Old Lucene query parser, that is currently rarely used. It allowed after query sorting specification, that is marked as deprecated, for example: <em>q={!lucenePlusSort}title:harry;price asc</em></p>
<h3>Function Query Parser &#8211; func</h3>
<p>Query parser that allows us to use function queries (<a href="http://wiki.apache.org/solr/FunctionQuery">http://wiki.apache.org/solr/FunctionQuery</a>) in our queries. For example we can make calculations during queries &#8211; <em>q={!func}add($value1,$value2)&amp;value1=max(price,100)&amp;value2=1.0</em>.</p>
<h3>Prefix Query Parser &#8211; prefix</h3>
<p>Parser that is not field type aware, so no analysis is done on the input text. It allows us to make prefix queries. For example a query like <em>q={!prefix}har</em> is more of less equal to <em>q=har*</em> in Lucene query parser syntax.</p>
<h3>Boost Query Parser &#8211; boost</h3>
<p>Boost query parser allows us to create boosting queries from the input value. When using local params we have our query that should be boosted and the <em>b</em> parameter &#8211; the query that will be used for boosting. For example <em>{!boost b=recip(ms(NOW,published),3.16e-11,1,1)}harry</em> will cause the <em>harry</em> query to be boosted on the basis of publication date.</p>
<h3>Dismax Query Parser &#8211; dismax</h3>
<p>Query parser that supports simplified version of Lucene query syntax (for example field names are not allowed) and creates disjunction max queries from each term from the user input against all the fields provided in the <em>qf</em> parameter. It allows specifying how much terms should match (the <em>mm</em> parameter) and how lower scoring query elements should be treated (<em>tie</em> parameter). All the parameters supported by dismax query parser (and its overview) can be found at: <a href="http://wiki.apache.org/solr/DisMaxQParserPlugin">http://wiki.apache.org/solr/DisMaxQParserPlugin</a>.</p>
<h3>Extended Dismax Query Parser &#8211; edismax</h3>
<p>Extended version of the mentioned dismax query parser, which allows us to use field names in the main query. It was designed to provide users with the possibility of specifying more advanced queries in comparison to dismax query parser. All the parameters supported by extended dismax query parser (and its overview) can be found at: <a href="http://wiki.apache.org/solr/ExtendedDisMax">http://wiki.apache.org/solr/ExtendedDisMax</a>.</p>
<h3>Field Query Parser &#8211; field</h3>
<p>Field query parser allows us to make a query against a field, applying text analysis and constructing a phrase query if appropriate, for example: <em>{!field f=title}harry potter</em>. This is more or less equivalent to Lucene query parser expression of <em>title:&#8221;harry potter&#8221;</em>.</p>
<h3>Raw Query Parser &#8211; raw</h3>
<p>Query parser which allows us to pass a term, which will not be analysed or transformed in any way. For example, the <em>{!raw f=title}harry</em> will create a term query against the <em>title</em> field with the exact value of <em>harry</em>, without any analysis done.</p>
<h3>Term Query Parser &#8211; term</h3>
<p>Query parser useful for making filters with human readable terms, like the ones for faceting or terms component, for example <em>{!term f=category}book</em>. Please remember, that the term given for the term query parser will not be analyzed or transformed.</p>
<h3>Nested Query Parser &#8211; query</h3>
<p>A query parser that allows us to specify a nested query, with the ability to change its type in the nested query. For example, the following query <em>{!query defType=func v=$query}&amp;$query=max(price,100)</em> would result in function query defined in the <em>query</em> parameter, however if we would change the <em>query</em> parameter to <em>$query={!term f=category}book</em>, the term query parser would be used, so the function query parser would be overwritten. This query parser can be useful in situations, when we allow users to reference values stored in handlers configurations.</p>
<h3>Function Range Query Parser &#8211; frange</h3>
<p>Query parser that allows us to create a range query over a function value (we&#8217;ve wrote about it long time ago &#8211; <a title="Quick look: frange" href="http://solr.pl/en/2011/05/30/quick-look-frange/">http://solr.pl/en/2011/05/30/quick-look-frange/</a>). It exposes four parameters <em>l</em> (lower bound), <em>u</em> (upper bound), <em>incl</em> (include lower bound), <em>incu</em> (include upper bound) which allows us to configure its behavior. An example query using this query parser could look like this: <em>{!frange l=10 u=12 incl=true incu=true}sum(price,rate)</em>.</p>
<h3>Spatial Filter Query Parser &#8211; geofilt</h3>
<p>Spatial filter query parser allows us to make queries which results will be narrowed to documents that are in the distance from a given point. For example, by running a query like <em>q=*:*&amp;fq={!geofilt pt=52.14,21.10 sfield=location d=50}</em> we will find documents that are more or less in Warsaw, Poland <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /> You can find more about <em>geofilt</em> query parser on Solr wiki &#8211; <a href="http://wiki.apache.org/solr/SpatialSearch#geofilt_-_The_distance_filter">http://wiki.apache.org/solr/SpatialSearch#geofilt_-_The_distance_filter</a>.</p>
<h3>Spatial Box Query Parser &#8211; bbox</h3>
<p>Similar to <em>geofilt</em> query parser, the spatial box query parser allows us to narrow down query results to only those documents, that are in the location of interest, but because of approximations it is less demanding, when it comes to processing power (however you may get slightly more results when comparing to <em>geofilt</em>). An example query would be very similar to the one shown in <em>geofilt</em> example: <em>q=*:*&amp;fq={!bbox pt=52.14,21.10 sfield=location d=50}</em>. You can find more about it on Solr wiki &#8211; <a href="http://wiki.apache.org/solr/SpatialSearch#bbox_-_Bounding-box_filter">http://wiki.apache.org/solr/SpatialSearch#bbox_-_Bounding-box_filter</a>.</p>
<h3>Join Query Parser &#8211; join</h3>
<p>Query parser that allows us to make pseudo joins between documents, both coming from the same core and ones that are between different cores, for example: <em>q={!join from=parent to=id}color:Yellow</em>. You can see an example and read more about this query parser in <a title="Waiting for 4.0: SOLR-2272 – Solr and JOIN functionality" href="http://solr.pl/en/2011/02/21/waiting-for-4-0-solr-2272-solr-and-join-functionality/">http://solr.pl/en/2011/02/21/waiting-for-4-0-solr-2272-solr-and-join-functionality/</a>.</p>
<h3>Surround Query Parser &#8211; surround</h3>
<p>Contrib query parser, that allows us to use span query in Solr. You can read more about this query parser at: <a href="http://wiki.apache.org/solr/SurroundQueryParser">http://wiki.apache.org/solr/SurroundQueryParser</a>. We will try to write a blog post about how span queries work both in Lucene and Solr &#8211; in general it allows searching for terms or phrases that use position information.</p>
<h3>Switch Query Parser &#8211; switch</h3>
<p>The logic of switch query parser is quite simple – allow processing of a simple logic on the Solr side and add it as a sub-query. You can find an example usage and read more about this query parser at: <a title="Switch Query Parser – quick look" href="http://solr.pl/en/2013/06/03/switch-query-parser-quick-look/">http://solr.pl/en/2013/06/03/switch-query-parser-quick-look/</a>.</p>
<h3>Max Score Query Parser &#8211; maxscore</h3>
<p>Very similar to Lucene query parser (accept all of its parameters), but the score of the documents is not the sum of all scoring elements, but the score of the maximum scoring element. It allows to use the <em>tie</em> parameter which defines how the final document score will be calculated (similar to how <em>tie</em> parameter works in dismax query parser and extended dismax query parser). For <em>tie=0.0</em> only the score of the maximum scoring element will be used, for <em>tie=1.0</em> a sum of all scoring elements will be given to a document. An example query using this parser can look like this: <em>q=potter {!maxscore v=&#8217;harry&#8217;}</em>. You can read more about <em>tie </em>parameter at <a title="What can we use Dismax tie parameter for ?" href="http://solr.pl/en/2012/02/06/what-can-we-use-dismax-tie-parameter-for/">http://solr.pl/en/2012/02/06/what-can-we-use-dismax-tie-parameter-for/</a>.</p>
<h3>Small summary</h3>
<p>As you can see Solr provides a wide range of query parsers that can be included in our queries. With that we can make complicated queries, that will leverage different functionalities of Solr. However there is one thing to remember &#8211; the more complicated the query is, the more processing power it will require. Keep that in mind when constructing your queries.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://solr.pl/en/2013/08/19/solr-and-available-query-parsers/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Switch Query Parser &#8211; quick look</title>
		<link>https://solr.pl/en/2013/06/03/switch-query-parser-quick-look/</link>
					<comments>https://solr.pl/en/2013/06/03/switch-query-parser-quick-look/#respond</comments>
		
		<dc:creator><![CDATA[Rafał Kuć]]></dc:creator>
		<pubDate>Mon, 03 Jun 2013 11:59:28 +0000</pubDate>
				<category><![CDATA[Solr]]></category>
		<category><![CDATA[4.2]]></category>
		<category><![CDATA[parser]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[query parser]]></category>
		<category><![CDATA[solr]]></category>
		<category><![CDATA[switch]]></category>
		<category><![CDATA[SwitchQueryParser]]></category>
		<guid isPermaLink="false">http://sematext.solr.pl/?p=556</guid>

					<description><![CDATA[The number of different query parsers in Solr was always an amusement for me. Can someone here say how many of them are currently available and say what are those? Anyway, in this entry we won&#8217;t be talking about all]]></description>
										<content:encoded><![CDATA[<p>The number of different query parsers in Solr was always an amusement for me. Can someone here say how many of them are currently available and say what are those? Anyway, in this entry we won&#8217;t be talking about all the query parsers available in Solr, but we will take a quick look at one of them &#8211; the <em>SwitchQueryParser</em> introduced in Solr 4.2.</p>
<p><span id="more-556"></span></p>
<h3>Logic behind the parser</h3>
<p>The logic of the&nbsp;<em>SwitchQueryParser</em> is quite simple &#8211; allow processing a simple logic on the Solr side and add it as a sub-query. For example let&#8217;s say that we have an application that understand the following four values of the&nbsp;<em>priceRange</em> field:</p>
<ul>
<li><em>cheap</em> &#8211; when the price of the product (indexed in the&nbsp;<em>price</em> field) is lower than 10$,</li>
<li><em>average</em> &#8211; when the price is between 10 and 30$,</li>
<li><em>expensive</em> &#8211; when the product price is higher than&nbsp; 30$,</li>
<li><em>all</em> &#8211; in case we want to return all the documents without looking at the price.</li>
</ul>
<p>We want to have this logic stored in Solr somehow in order not to change our application or its configuration every time we want to change the above ranges. For this purpose we will use the <em>SwitchQueryParser</em>.</p>
<h3>Our query</h3>
<p>Let&#8217;s assume that our application will be able to send the following query:
</p>
<pre class="brush:bash">http://localhost:8983/solr/collection1/price?q=*:*&amp;priceRange=cheap</pre>
<p>We want the above query to return all the documents (<em>q=*:*</em>) narrowed to only those that are cheap, which in our case it will mean that they have price lower than 10$ (<em>priceRange=cheap </em>parameter).</p>
<h3>Solr configuration</h3>
<p>Of course we don&#8217;t want to send the <em>price</em> range in the query, because that wouldn&#8217;t make much sense for us. Because of that we decided to alter the <em>solrconfig.xml</em> file and add a new SearchHandler with the name of /<em>price</em>, which is configured as follows:
</p>
<pre class="brush:xml">&lt;requestHandler name="/price"&gt;
 &lt;lst name="defaults"&gt;
  &lt;str name="priceRange"&gt;all&lt;/str&gt;
 &lt;/lst&gt;
 &lt;lst name="appends"&gt;
  &lt;str name="fq"&gt;{!switch case.all='price:[* TO *]' case.cheap='price:[0 TO 10]' case.average='price:[10 TO 30]' case.expensive='price:[30 TO *]' v=$priceRange}&lt;/str&gt;
 &lt;/lst&gt;
&lt;/requestHandler&gt;</pre>
<p>As you can see the configuration of our SearchHandler consist of two elements. In the <em>defaults</em> section we defined the default value for the <em>priceRange</em> parameter, which is <em>all</em>. In addition to that, we&#8217;ve defined filter (<em>fq</em>) which is using the <em>SwitchQueryParser</em> (<em>!switch</em>). For each of the possible values the <em>priceRange</em> parameter can take (<em>v=$priceRange</em>) we defined a filter on the <em>price</em> field using the following expression &#8211;&nbsp;<em>case.priceRangeValue</em><em>=filter</em>. So, when the value of the <em>priceRange</em> parameter in the query will be equal to <strong><em>cheap</em></strong> than Solr will use the filter defined by the <em>case.<strong>cheap </strong></em>part of the filter definition, when the <em>priceRange</em> parameter value will be equal to <strong><em>expensive </em></strong>than Solr will use the filter defined by the <em>case.<strong>expensive </strong></em>and so on.</p>
<h3>What to remember about</h3>
<p>There is one crucial thing to remember when using the described parser. In our case, if we would <em>priceRange</em> parameter value different than the four mentioned it will result in Solr error.</p>
<h3>Summary</h3>
<p>In my opinion the <em>SwitchQueryParser</em> is a nice addition, although it is rather a feature that will be used by the minority of the users. However taking into consideration that is can help implementing some very basic logic and because it is simple (and thus not hungry for resources) there will be users which will find this nice query parser useful <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://solr.pl/en/2013/06/03/switch-query-parser-quick-look/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
