<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I have started working on that in the plane back home.<div><span class="Apple-style-span" style="font-family: Verdana; line-height: 15px; ">It's available upstream and requires the upstream commons-annotations and annotations projects.</span></div><div><br></div><div><span class="Apple-style-span" style="font-family: Courier; font-size: 11px; -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">&nbsp;&nbsp; &nbsp; &nbsp;SearchMapping mapping = new SearchMapping();&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;mapping.analyzerDef( "stem", StandardTokenizerFactory.class )&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.tokenizerParam( "name", "value" )&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.tokenizerParam(&nbsp; "name2", "value2" )&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.filter( LowerCaseFilterFactory.class )&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.filter( SnowballPorterFilterFactory.class)&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.param("language", "English")&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.analyzerDef( "ngram", StandardTokenizerFactory.class )&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.tokenizerParam( "name", "value" )&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.tokenizerParam(&nbsp; "name2", "value2" )&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.filter( LowerCaseFilterFactory.class )&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.filter( NGramFilterFactory.class)&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.param("minGramSize", "3")&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.param("maxGramSize", "3")&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.indexedClass(Address.class, "Address_Index")&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.property("street1", ElementType.FIELD)&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.field()&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.field()&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.name("street1_iso")&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.store( Store.YES )&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.index( Index.TOKENIZED )&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.analyzer( ISOLatin1Analyzer.class)&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.field()&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.name("street1_ngram")&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.analyzer("ngram")&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.indexedClass(User.class)&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.property("name", ElementType.METHOD)&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.field()&nbsp;<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.analyzerDef( "minimal", StandardTokenizerFactory.class&nbsp; );&nbsp;<br><br>&nbsp; &nbsp;&nbsp; &nbsp;configuration.getProperties().put( "hibernate.search.mapping_model", mapping );&nbsp;</span></div><div><span class="Apple-style-span" style="font-family: Verdana; font-size: 16px; "><span class="postbody" style="font-size: 12px; line-height: 125%; "><br>It works nicely (analyzerDef is not wired yet) and the mapping API needs to be completed. A benefit is that it solves the problem encountered by people willing to get XML mapping support in a much nicer way.&nbsp;<br></span></span></div><div><font class="Apple-style-span" face="Verdana"><span class="Apple-style-span" style="line-height: 15px;"><br></span></font></div><div><font class="Apple-style-span" face="Verdana"><span class="Apple-style-span" style="line-height: 15px;">It would benefit from a few additional pairs of eye before completing the work.</span></font></div><div><div><br></div><div><a href="http://forum.hibernate.org/viewtopic.php?p=2409404#2409404">http://forum.hibernate.org/viewtopic.php?p=2409404#2409404</a></div><div><a href="http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-352">http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-352</a></div></div></body></html>