Note that there are some explanatory texts on larger screens.

plurals
  1. POSolr query vs. filter query not working the same
    primarykey
    data
    text
    <p>I have been using solr for a while now (acts_as_solr) , but just came across a very strange one I can't seem to get working.</p> <p>I have a 'text' field lets call it</p> <pre><code>audience = [students, teachers, students_teachers, none] </code></pre> <p>when I send the query</p> <pre><code>q= audience:students </code></pre> <p>it returns only those with it set to students.</p> <p>yet if I do </p> <pre><code>fq= audience:students </code></pre> <p>I get back results with both [students, students_teachers]</p> <p>I have tried putting quotes, parens and all sorts around the filter query, but it seems like it is not honoring them as I would expect. I am actually using a negation side of fq here, to hide from the user some results.</p> <p>I am using solr 1.4.1</p> <p>Any thoughts? I am about to change the options to unique words with no reuse. Might be an issue with the _ 's in the names.</p> <pre><code>&lt;fieldType name="text" class="solr.TextField" positionIncrementGap="100"&gt; &lt;analyzer type="index"&gt; &lt;tokenizer class="solr.WhitespaceTokenizerFactory"/&gt; &lt;filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/&gt; &lt;filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0"/&gt; &lt;filter class="solr.LowerCaseFilterFactory"/&gt; &lt;filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/&gt; &lt;filter class="solr.RemoveDuplicatesTokenFilterFactory"/&gt; &lt;/analyzer&gt; &lt;analyzer type="query"&gt; &lt;tokenizer class="solr.WhitespaceTokenizerFactory"/&gt; &lt;filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/&gt; &lt;filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/&gt; &lt;filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0"/&gt; &lt;filter class="solr.LowerCaseFilterFactory"/&gt; &lt;filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/&gt; &lt;filter class="solr.RemoveDuplicatesTokenFilterFactory"/&gt; &lt;/analyzer&gt; &lt;/fieldType&gt; </code></pre>
    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.
 

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