About this:

<copyField source="text_ngrams" dest="text"/>

The NGrams are going to be indexed on the field "text_ngrams", not on
"text". For the field "text", Solr will apply the text analysis (which I
guess doesn't have NGrams). You have to search on the "text_ngrams" field,
something like "text_ngrams:hippo" or "text_ngrams:potamu". Are you
searching like this?

Tomás

On Wed, Feb 2, 2011 at 4:07 PM, Script Head <scripth...@gmail.com> wrote:

> Hello,
>
> I have the following definitions in my schema.xml:
>
> <fieldType name="testedgengrams" class="solr.TextField">
>    <analyzer type="index">
>        <tokenizer class="solr.LowerCaseTokenizerFactory"/>
>        <filter class="solr.NGramFilterFactory" minGramSize="3"
> maxGramSize="15"/>
>    </analyzer>
>    <analyzer type="query">
>        <tokenizer class="solr.LowerCaseTokenizerFactory"/>
>    </analyzer>
> </fieldType>
> ...
> <field name="text_ngrams" type="testedgengrams" indexed="true"
> stored="true"/>
> ...
> <copyField source="text_ngrams" dest="text"/>
>
> There is a document "Hippopotamus is fatter than a Platypus" indexed.
> When I search for "Hippopotamus" I receive the expected result. When I
> search for any partial such as "Hippo" or "potamu" I get nothing. I
> could use some guidance.
>
> Script Head
>

Reply via email to