Hello!

Do you use the 'text' field for searching or the 'name' field ?
Remember that, when you use copyField the data that is copied is the
original data, not the analyzed one.

-- 
Regards,
 Rafał Kuć

> Hi,

> I'm trying to define an EdgeNGram field but for some reason it doesn't work.
> My fieldType definition is:

>         <fieldType name="text_partial" class="solr.TextField" 
> omitNorms="false">
>                 <analyzer type="index">
>                         <tokenizer
> class="solr.EdgeNGramTokenizerFactory" minGramSize="3"
> maxGramSize="15" side="front" />
>                         <filter class="solr.StopFilterFactory" 
> ignoreCase="true"
> words="stopwords.txt" enablePositionIncrements="true" />
>                         <filter class="solr.LowerCaseFilterFactory"/>
>                 </analyzer>
>                 <analyzer type="query">
>                         <tokenizer
> class="solr.StandardTokenizerFactory"/>
>                         <filter class="solr.StopFilterFactory" 
> ignoreCase="true"
> words="stopwords.txt" enablePositionIncrements="true" />
>                         <filter class="solr.SynonymFilterFactory" 
> synonyms="synonyms.txt"
> ignoreCase="true" expand="true"/>
>                         <filter class="solr.LowerCaseFilterFactory"/>
>                 </analyzer>
>         </fieldType>

> I then use this fieldType in a field called "name":
> <field name="name" type="text_partial" indexed="true" stored="false"/>

> I have a couple of other fields, which are all copied to a field called
> "text":
> <field name="text" type="text_general" indexed="true" stored="false"
multiValued="true"/>>
>  <defaultSearchField>text</defaultSearchField>
>  <copyField source="name" dest="text"/>
>    <copyField source="description" dest="text"/>
>    <copyField source="parts" dest="text"/>
>    <copyField source="tags" dest="text"/>
>    <copyField source="username" dest="text"/>

> Is it because I'm using this mutiValued "text" field that the
> EdgeNGramTokenizer doesn't work? I have a name called "test". When I search
> for "test" it returns the result, but when I search for "tes" it doesn't. I
> already did a full re-index.

> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/EdgeNGramTokenizer-not-working-tp3675926p3675926.html
> Sent from the Solr - User mailing list archive at Nabble.com.




Reply via email to