@@ -0,0 +1,2077 @@
+/*%0A * Licensed to the Apache Software Foundation (ASF) under one or more%0A * contributor license agreements.  See the NOTICE file distributed with%0A * this work for additional information regarding copyright ownership.%0A * The ASF licenses this file to You under the Apache License, Version 2.0%0A * (the %22License%22); you may not use this file except in compliance with%0A * the License.  You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.musicbrainz.search.analysis;%0A%0A%0Aimport org.apache.lucene.analysis.standard.StandardAnalyzer;%0Aimport org.apache.lucene.analysis.util.TokenizerFactory;%0Aimport org.apache.lucene.util.AttributeFactory;%0A%0Aimport java.util.Map;%0A%0A/**%0A * Factory for %7B@link MusicbrainzTokenizer%7D.%0A * %3Cpre class=%22prettyprint%22%3E%0A * &lt;fieldType name=%22text_clssc%22 class=%22solr.TextField%22 positionIncrementGap=%22100%22&gt;%0A *   &lt;analyzer&gt;%0A *     &lt;tokenizer class=%22solr.MusicbrainzTokenizerFactory%22 maxTokenLength=%22120%22/&gt;%0A *   &lt;/analyzer&gt;%0A * &lt;/fieldType&gt;%3C/pre%3E%0A */%0Apublic class MusicbrainzTokenizerFactory extends TokenizerFactory %7B%0A    private final int maxTokenLength;%0A%0A    /** Creates a new MusicbrainzTokenizerFactory */%0A    public MusicbrainzTokenizerFactory(Map%3CString,String%3E args) %7B%0A        super(args);%0A        maxTokenLength = getInt(args, %22maxTokenLength%22, StandardAnalyzer.DEFAULT_MAX_TOKEN_LENGTH);%0A        if (!args.isEmpty()) %7B%0A            throw new IllegalArgumentException(%22Unknown parameters: %22 + args);%0A        %7D%0A    %7D%0A%0A    @Override%0A    public MusicbrainzTokenizer create(AttributeFactory factory) %7B%0A        MusicbrainzTokenizer tokenizer = new MusicbrainzTokenizer();%0A        tokenizer.setMaxTokenLength(maxTokenLength);%0A        return tokenizer;%0A    %7D%0A%7D

Add a factory class to allow solr to instantiate MB tokenizer