| 42 | === Implementation Analyzer === |
| 43 | By default Hibernate Search is configured with the StandardFilter. One filter can be set via its configuration. Defining other has to be done via the Hibernate Search Annotations. An example of an annotation including StandardFilter, LowerCaseFilter and ISOLatin1AccentFilterFactory is this: |
| 44 | |
| 45 | @AnalyzerDef(tokenizer = @TokenizerDef(factory = StandardTokenizerFactory.class), filters = { |
| 46 | @TokenFilterDef(factory = StandardFilter.class), |
| 47 | @TokenFilterDef(factory = LowerCaseFilter.class), |
| 48 | @TokenFilterDef(factory = ISOLatin1AccentFilterFactory.class) |
| 49 | }) |
| 50 | |
| 51 | It is needed to add an extra library to the application according this Maven definition: |
| 52 | <dependency> |
| 53 | <groupId>org.apache.solr</groupId> |
| 54 | <artifactId>solr-lucene-analyzers</artifactId> |
| 55 | <version>1.3.0</version> |
| 56 | </dependency> |
| 57 | |
| 58 | For some reason Eclipse still keeps complaining about a org.apache.solr.analysis.TokenFilterFactory which should be added to the classpath. Running the artefact on the command line does not give any problem. For now this changes has not been committed. It has to be investigated whether there is really a problem or that this is an Eclipse bug (most likely). |
| 59 | |
| 60 | |
| 61 | ---- |
| 62 | |