Note that there are some explanatory texts on larger screens.

plurals
  1. POFilter query nested within the main solr query
    primarykey
    data
    text
    <p>Solr provides a filter query (parameter <code>fq</code>) feature which allows terms to be matched in a binary manner without affecting the document's score. In addition the set of documents matching a filter query is cached for reuse with varying main queries (parameter <code>q</code>).</p> <p>In a particular application, I would like to match documents without affecting the score (I am less concerned about caching at present), but am only able to modify the main <code>q</code> parameter.</p> <p>I would like the output to be equivalent to:</p> <pre><code>/select?q=foo&amp;fq=bar </code></pre> <p>I had thought I could use <a href="http://wiki.apache.org/solr/LocalParams" rel="nofollow">LocalParams</a> do something like:</p> <pre><code>/select?q=%2bfoo %2b_query_:"{!fq=bar} *:*" </code></pre> <p>(Note: <code>%2b</code> parses to a <code>+</code>, making those terms prefixed by it mandatory.) I would expect the LocalParams term to act like <code>/select?q=*:*&amp;fq=bar</code>, but <code>fq=bar</code> seems to have no effect. Why is it not supported?</p> <p>Would it instead be reasonable to implement a new query parser called <code>filter</code> such that the following were instead possible?</p> <pre><code>/select?q=%2bfoo %2b_query_:"{!filter} bar" </code></pre> <p>The LocalParams term here would be interpreted as running <code>/select?q=bar</code> but rectifying its score to 0 or 1.</p> <p>Or is there some standard function that allows me to modify the score assigned to a term so it gets rectified to 0 or 1?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload