Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>To enable partial word searching</strong></p> <p>you must edit your local schema.xml file, usually under solr/config, to add either:</p> <ol> <li>NGramFilterFactory</li> <li>EdgeNGramFilterFactory</li> </ol> <p>Here's what mine looks like: <a href="http://screencast.com/t/NqX9pi5y/">sample solr schema.xml</a></p> <p>Here's the line to paste:</p> <pre><code>&lt;filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="15" side="front"/&gt; </code></pre> <p><strong>EdgeNGram</strong></p> <p>I went with the EdgeN option. It doesn't allow for searching in the middle of words, but it does allow partial word search starting from the beginning of the word. This cuts way down on false positives / matches you don't want, performs better, and is usually not missed by the users. Also, I like the minGramSize=2 so you must enter a minimum of 2 characters. Some folks set this to 3.</p> <p>Once your local is setup and working, you must edit the schema.xml used by websolr, otherwise you will get the default behavior which requires the full-word to be entered even if you have full text searching configured for your models.</p> <p><strong>Take it to the next level</strong></p> <p><a href="http://altoros.github.io/2013/2-days-with-solr/">5 ways to speed up indexing</a></p> <h2>Special instructions for editing the websolr schema.xml if you are using Heroku</h2> <ol> <li>Go to the Heroku online dashboard for your app</li> <li>Go to the resources tab, then click on the Websolr add-on</li> <li>Click the default link under Indexes</li> <li>Click on the Advanced Configuration link</li> <li>Paste in your schema.xml from your local, including the config for your Ngram tokenizer of choice (mentioned above). Save.</li> <li>Copy the link in the "Configure your Heroku application" box, then paste it into terminal to set your WEBSOLR_URL link in your heroku config. </li> <li>Click the Index Status link to get nifty stats and see if you are running fast or slow.</li> <li>Reindex everything</li> </ol> <blockquote> <p>heroku run rake sunspot:reindex[5000]</p> </blockquote> <ul> <li>Don't use heroku run rake sunspot:solr:reindex - it is deprecated, accepts no parameters and is WAY slower</li> <li>Default batch size is 50, most people suggest using 1000, but I've seen significantly faster results (1000 rows per second as opposed to around 500 rps) by bumping it up to 5000+</li> </ul>
    singulars
    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. VO
      singulars
      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