@Test public void checkDefaultAnalyzers() { final Map<String, Analyzer> analyzers = producer.getAnalyzers(); assertEquals(5, analyzers.size()); assertTrue(analyzers.get(LibraryFileNameIndexTerm.TERM) instanceof FilenameAnalyzer); assertTrue(analyzers.get(LibraryRepositoryRootIndexTerm.TERM) instanceof FilenameAnalyzer); assertTrue(analyzers.get(ModuleRootPathIndexTerm.TERM) instanceof FilenameAnalyzer); assertTrue(analyzers.get(PackageNameIndexTerm.TERM) instanceof LowerCaseOnlyAnalyzer); assertTrue(analyzers.get(LuceneIndex.CUSTOM_FIELD_FILENAME) instanceof FilenameAnalyzer); }
Map<String, Analyzer> getAnalyzers() { return new HashMap<String, Analyzer>() {{ put(LibraryFileNameIndexTerm.TERM, new FilenameAnalyzer()); put(LibraryRepositoryRootIndexTerm.TERM, new FilenameAnalyzer()); put(ModuleRootPathIndexTerm.TERM, new FilenameAnalyzer()); put(PackageNameIndexTerm.TERM, new LowerCaseOnlyAnalyzer()); put(LuceneIndex.CUSTOM_FIELD_FILENAME, new FilenameAnalyzer()); }}; }
DefaultLuceneConfigProducer { Map<String, Analyzer> getAnalyzers() { return new HashMap<String, Analyzer>() {{ put(LibraryFileNameIndexTerm.TERM, new FilenameAnalyzer()); put(LibraryRepositoryRootIndexTerm.TERM, new FilenameAnalyzer()); put(ModuleRootPathIndexTerm.TERM, new FilenameAnalyzer()); put(PackageNameIndexTerm.TERM, new LowerCaseOnlyAnalyzer()); put(LuceneIndex.CUSTOM_FIELD_FILENAME, new FilenameAnalyzer()); }}; } }
DefaultLuceneConfigProducer { Map<String, Analyzer> getAnalyzers() { return new HashMap<String, Analyzer>() {{ put(LibraryFileNameIndexTerm.TERM, new FilenameAnalyzer()); put(LibraryRepositoryRootIndexTerm.TERM, new FilenameAnalyzer()); put(ModuleRootPathIndexTerm.TERM, new FilenameAnalyzer()); put(PackageNameIndexTerm.TERM, new LowerCaseOnlyAnalyzer()); put(LuceneIndex.CUSTOM_FIELD_FILENAME, new FilenameAnalyzer()); }}; }  }
DefaultLuceneConfigProducer { Map<String, Analyzer> getAnalyzers() { return new HashMap<String, Analyzer>() {{ put(LibraryFileNameIndexTerm.TERM, new FilenameAnalyzer()); put(LibraryRepositoryRootIndexTerm.TERM, new FilenameAnalyzer()); put(ModuleRootPathIndexTerm.TERM, new FilenameAnalyzer()); put(PackageNameIndexTerm.TERM, new LowerCaseOnlyAnalyzer()); put(LuceneIndex.CUSTOM_FIELD_FILENAME, new FilenameAnalyzer()); }}; }  @PostConstruct void setup(); @Produces @Named("luceneConfig") MetadataConfig configProducer(); }
DefaultLuceneConfigProducer { Map<String, Analyzer> getAnalyzers() { return new HashMap<String, Analyzer>() {{ put(LibraryFileNameIndexTerm.TERM, new FilenameAnalyzer()); put(LibraryRepositoryRootIndexTerm.TERM, new FilenameAnalyzer()); put(ModuleRootPathIndexTerm.TERM, new FilenameAnalyzer()); put(PackageNameIndexTerm.TERM, new LowerCaseOnlyAnalyzer()); put(LuceneIndex.CUSTOM_FIELD_FILENAME, new FilenameAnalyzer()); }}; }  @PostConstruct void setup(); @Produces @Named("luceneConfig") MetadataConfig configProducer();  }