On Wed, Feb 2, 2011 at 4:44 PM, Script Head <scripth...@gmail.com> wrote:
> Yes, I have tried searching on text_ngrams as well and it produces no > results. > > On a related note, since I have <copyField source="text_ngrams" > dest="text"/> wouldn't the ngrams produced by text_ngrams field > definition also be available within the text field? > No, look at: http://wiki.apache.org/solr/SchemaXml#Copy_Fields Solr will apply the corresponding analysis chain for each field. <http://wiki.apache.org/solr/SchemaXml#Copy_Fields>Anyway, you should be able to find the document when doing queries like "text_ngrams:hippo" I can see you are storing the field "text_ngrams", when you search for Hippopotamus (and find results), how do you see the field "text_ngrams" on the returned docs? you should see the NGrams there (the same data that you should see when using the analysis page of Solr admin) Tomás > > > 2011/2/2 Tomás Fernández Löbbe <tomasflo...@gmail.com>: > > 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 > >> > > >