I do not use Solr. So I downloaded WordDelimiterFilter and WordDelimiterIterator from Solr. And added this code to his custom analyzer:
final Tokenizer source = new StandardTokenizer(matchVersion, reader); TokenStream result = new StandardFilter(matchVersion, source); int flags = WordDelimiterFilter.SPLIT_ON_NUMERICS | WordDelimiterFilter.GENERATE_NUMBER_PARTS | WordDelimiterFilter.GENERATE_WORD_PARTS; result = new WordDelimiterFilter(result, flags, null);
source share