Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><code>LowercaseTokenizer</code> is functionality equivalent to a <code>LetterTokenizer</code> and <code>LowercaseFilter</code>. Judging by the case you've provided, you don't want <code>LetterTokenizer</code>-like functionality, which will only index consecutive sets of letters. Effectively, before the Ngramming, you have the tokens:</p> <pre><code>mem, cf, mb, aok </code></pre> <p>I think what you want is a <code>KeywordTokenizer</code> and <code>LowercaseFilter</code></p> <p>Since you want to be able to search with missing characters at the end as well as the beginning, you need to perform a prefix query. An EdgeNgramTokenizer only produces NGrams taking characters off the front, such as:</p> <pre><code>mem-cf-512mb-aok, em-cf-512mb-aok, m-cf-512mb-aok, -cf-512mb-aok </code></pre> <p>So, to pick up matches with missing characters at the end, a simple prefix search should work, like:</p> <p><code>m-cf-512mb-a*</code></p> <p><code>minGramSize="1"</code> is almost certainly overzealous. You don't likely want 1-grams (ie. matching just <code>"k"</code>). Your minimal case above would is 12 in length, for instance. I'll guess 5 for a reasonable min gram size.</p> <pre><code>&lt;analyzer type="index"&gt; &lt;tokenizer class="solr.KeywordTokenizerFactory"/&gt; &lt;filter class="solr.LowercaseFilterFactory"/&gt; &lt;filter class="solr.EdgeNGramFilterFactory" minGramSize="5" maxGramSize="50" side="front"/&gt; &lt;/analyzer&gt; &lt;analyzer type="query"&gt; &lt;tokenizer class="solr.KeywordTokenizerFactory"/&gt; &lt;filter class="solr.LowercaseFilterFactory"/&gt; &lt;/analyzer&gt; </code></pre> <p>And again, you should use queries appended with a trailing wildcard.</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