Because that is the semantics of Solr/Lucene wildcard syntax. * stands for "any number of any character". Basically, it enumerates all the terms in the field for all the documents and assembles a list of all of them that contain the substring "abc" and uses that as one of the clauses of your search...
Best Erick On Thu, Nov 5, 2009 at 6:07 PM, A. Steven Anderson < a.steven.ander...@gmail.com> wrote: > Thanks for the solution, but could you elaborate on how it would find > something like *abc* in a field that contains xxxxabcxxxx. > > Steve > > On Thu, Nov 5, 2009 at 5:25 PM, Bernadette Houghton < > bernadette.hough...@deakin.edu.au> wrote: > > > I've just set up something similar (much thanks to Avesh!)- > > > > <fieldType name="edgytext" class="solr.TextField" > > positionIncrementGap="100"> > > <analyzer type="index"> > > <tokenizer class="solr.KeywordTokenizerFactory"/> > > <filter class="solr.LowerCaseFilterFactory"/> > > <filter class="solr.EdgeNGramFilterFactory" minGramSize="5" > > maxGramSize="25" /> > > </analyzer> > > <analyzer type="query"> > > <tokenizer class="solr.KeywordTokenizerFactory"/> > > <filter class="solr.LowerCaseFilterFactory"/> > > </analyzer> > > </fieldType> > > > > <fieldType name="doubleedgytext" class="solr.TextField" > > positionIncrementGap="100"> > > <analyzer type="index"> > > <tokenizer class="solr.KeywordTokenizerFactory"/> > > <filter class="solr.LowerCaseFilterFactory"/> > > <filter class="solr.NGramFilterFactory" minGramSize="5" > maxGramSize="25" > > /> > > </analyzer> > > <analyzer type="query"> > > <tokenizer class="solr.KeywordTokenizerFactory"/> > > <filter class="solr.LowerCaseFilterFactory"/> > > </analyzer> > > </fieldType> > > . > > . > > <field name="beginswith" type="edgytext" indexed="true" stored="false" > > multiValued="true"/> > > <field name="contains" type="doubleedgytext" indexed="true" > > stored="false" multiValued="true"/> > > . > > . > > <!-- Copy for BEGINSWITH search --> > > <copyField source="content" dest="beginswith"/> > > <copyField source="*_t" dest="beginswith"/> > > <copyField source="*_mt" dest="beginswith"/> > > > > <!-- Copy for CONTAINS search --> > > <copyField source="content" dest="contains"/> > > <copyField source="*_t" dest="contains"/> > > <copyField source="*_mt" dest="contains"/> > > > > bern >