Note that there are some explanatory texts on larger screens.

plurals
  1. POQuoted and Hyphenated query in Solr using Solrnet returning wrong results
    text
    copied!<p>We are using solrnet for indexing and querying over a set of text based files. We need help with a specific case of Search when we use a search term in double quotes and the search term is hyphenated. We are using StandardTokenizerFactory.</p> <p>Schema Definition:</p> <pre><code>&lt;fieldType name="text_general" class="solr.TextField" positionIncrementGap="100"&gt; &lt;analyzer type="index"&gt; &lt;tokenizer class="solr.StandardTokenizerFactory"/&gt; &lt;filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" /&gt; &lt;filter class="solr.LowerCaseFilterFactory"/&gt; &lt;/analyzer&gt; &lt;analyzer type="query"&gt; &lt;tokenizer class="solr.StandardTokenizerFactory"/&gt; &lt;filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" /&gt; &lt;filter class="solr.LowerCaseFilterFactory"/&gt; &lt;/analyzer&gt; &lt;/fieldType&gt; </code></pre> <p>Case 1: </p> <ul> <li>SearchTerm: "S-Video", quoted = true</li> <li>Catalina Log: q=ContentSearch:(\"S-Video\")</li> <li>The results returned contains hits for s and video</li> </ul> <p>Case 2: </p> <ul> <li>SearchTerm: "S - Video", quoted = true, note space around the hyphen</li> <li>Catalina Log: q=ContentSearch:("\"S+-+Video\"")</li> <li>The results returned contains hits only for S-Video(no spaces before or after hyphen)</li> </ul> <p>The records in Case 2 is the desired result but it should have been retrieved with the query from Case 1. Not sure what we are doing wrong.</p>
 

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