I am using hibernate search engine in that Trying to use analyzer, but it is giving error of path not found. Consider code:
@AnalyzerDef(name = "applicationanalyzer", tokenizer = @TokenizerDef(factory = StandardTokenizerFactory.class), filters = { @TokenFilterDef(factory = LowerCaseFilterFactory.class), @TokenFilterDef(factory = SnowballPorterFilterFactory.class, params = { @Parameter(name = "language", value = "English") }), @TokenFilterDef(factory = SynonymFilterFactory.class, params = { @Parameter(name = "synonyms", value = "hibernate/search/synonyms.txt"), //resource not found @Parameter(name = "expand", value = "true") }) @TokenFilterDef(factory = StopFilterFactory.class, params = { @Parameter(name ="words", value ="hibernate/search/stopwords.txt"), //resource not found @Parameter(name="resource_charset", value = "UTF-16BE"), @Parameter(name ="ignoreCase", value = "true"), @Parameter(name ="enablePositionIncrements", value = "true") }), })
As mention in the code resource not found error for path, the path is from directory resources/hibernate/search/ .
Dependency for hibernate is :
<dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-search</artifactId> <version>4.1.1.Final</version> </dependency> <!-- Additional Analyzers: --> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-search-analyzers</artifactId> <version>4.1.1.Final</version> </dependency> <!-- Infinispan integration: --> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-search-infinispan</artifactId> <version>4.1.1.Final</version> </dependency>
So please give me any suggestion. I tried it for 2 days still not getting. Thanks.
|