[ 
http://issues.apache.org/jira/browse/SOLR-81?page=comments#action_12458052 ] 
            
Otis Gospodnetic commented on SOLR-81:
--------------------------------------

Something like this, then?

    <fieldtype name="queryString" class="solr.TextField" 
positionIncrementGap="1">
      <analyzer>
       <tokenizer class="solr.NGramTokenizerFactory"/>  <!-- Or maybe just make 
an NGramAnalyzer? -->
      <filter class="solr.LowerCaseFilterFactory"/>
      </analyzer>
    </fieldtype>

Plus:

<copyField source="word" dest="word_start1"/>
<copyField source="word" dest="word_end1"/>
<copyField source="word" dest="word_start2"/>
<copyField source="word" dest="word_end2"/>
<copyField source="word" dest="word_start3"/>
<copyField source="word" dest="word_end3"/>
<copyField source="word" dest="word_gram1"/>
<copyField source="word" dest="word_gram2"/>
<copyField source="word" dest="word_gram3"/>
<copyField source="word" dest="word_gram4"/> 

I'd probably also want to give those word_start* n-grams some boost, though I 
don't see how to do that in schema.xml yet.


> Add Query Spellchecker functionality
> ------------------------------------
>
>                 Key: SOLR-81
>                 URL: http://issues.apache.org/jira/browse/SOLR-81
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>            Reporter: Otis Gospodnetic
>            Priority: Minor
>
> Use the simple approach of n-gramming outside of Solr and indexing n-gram 
> documents.  For example:
> <doc>
> <field name="word">lettuce</field>
> <field name="start3">let</field>
> <field name="gram3">let ett ttu tuc uce</field>
> <field name="end3">uce</field>
> <field name="start4">lett</field>
> <field name="gram4">lett ettu ttuc tuce</field>
> <field name="end4">tuce</field>
> </doc>
> See:
> http://www.mail-archive.com/solr-user@lucene.apache.org/msg01254.html
> Java clients: SOLR-20 (add delete commit optimize), SOLR-30 (search)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to