lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmg <>
Subject EdgeNGramTokenizer not working
Date Fri, 20 Jan 2012 16:26:06 GMT

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 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"/>

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
<field name="text" type="text_general" indexed="true" stored="false"
 <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:
Sent from the Solr - User mailing list archive at

View raw message