@@ -0,0 +1,1612 @@
+package com.github.rnewson.couchdb.lucene.util;%0A%0Aimport static org.hamcrest.CoreMatchers.is;%0Aimport static org.hamcrest.Matchers.containsString;%0Aimport static org.junit.Assert.assertThat;%0A%0Aimport org.apache.lucene.analysis.Analyzer;%0Aimport org.apache.lucene.analysis.PerFieldAnalyzerWrapper;%0Aimport org.apache.lucene.analysis.fr.FrenchAnalyzer;%0Aimport org.apache.lucene.analysis.standard.StandardAnalyzer;%0Aimport org.junit.Test;%0A%0Apublic class AnalyzersTest %7B%0A%0A    @Test%0A    public void testStandard() %7B%0A        assertThat(Analyzers.getAnalyzer(%22standard%22), is(StandardAnalyzer.class));%0A    %7D%0A%0A    @Test%0A    public void testFrench() %7B%0A        assertThat(Analyzers.getAnalyzer(%22french%22), is(FrenchAnalyzer.class));%0A    %7D%0A%0A    @Test%0A    public void testPerField() %7B%0A        final Analyzer analyzer = Analyzers.getAnalyzer(%22perfield:%7Bname:%5C%22standard%5C%22,age:%5C%22keyword%5C%22%7D%22);%0A        assertThat(analyzer, is(PerFieldAnalyzerWrapper.class));%0A        assertThat(analyzer.toString(), containsString(%22default=org.apache.lucene.analysis.standard.StandardAnalyzer%22));%0A        assertThat(analyzer.toString(), containsString(%22name=org.apache.lucene.analysis.standard.StandardAnalyzer%22));%0A        assertThat(analyzer.toString(), containsString(%22age=org.apache.lucene.analysis.KeywordAnalyzer%22));%0A    %7D%0A%0A    @Test%0A    public void testPerFieldDefault() %7B%0A        final Analyzer analyzer = Analyzers.getAnalyzer(%22perfield:%7Bdefault:%5C%22keyword%5C%22%7D%22);%0A        assertThat(analyzer, is(PerFieldAnalyzerWrapper.class));%0A        assertThat(analyzer.toString(), containsString(%22default=org.apache.lucene.analysis.KeywordAnalyzer%22));%0A    %7D%0A%0A%7D%0A

add perfield analyzer test