Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elasticSearch couldn't getAnalyzer #44

Open
xp13910818313 opened this issue Aug 23, 2019 · 3 comments
Open

elasticSearch couldn't getAnalyzer #44

xp13910818313 opened this issue Aug 23, 2019 · 3 comments

Comments

@xp13910818313
Copy link

if config hibernate.search.default.indexmanager : elasticsearch in yml,
will get
java.lang.ClassCastException: Cannot cast org.hibernate.search.elasticsearch.analyzer.impl.ScopedElasticsearchAnalyzerReference to org.hibernate.search.analyzer.impl.LuceneAnalyzerReference
when HibernateSearchApi.getAnalyzer()

because org.hibernate.search.engine.impl.ImmutableSearchFactory class has hardcode

@Override
public Analyzer getAnalyzer(IndexedTypeIdentifier type) {
       return getAnalyzerReference( type ).unwrap( LuceneAnalyzerReference.class ).getAnalyzer();
 }

current get ScopedElasticsearchAnalyzerReference instance.
how to resolve hibernate-search-engine-5.11.2.Final.jar problem ?

@lgrignon
Copy link
Collaborator

Hello @xp13910818313
Would 5.11.3 solve your problem?
If so, could you file a PR with the updated pom please?

@xp13910818313
Copy link
Author

Hello @lgrignon
5.11.3 Has same problem.
got this:
java.lang.ClassCastException: Cannot cast org.hibernate.search.elasticsearch.analyzer.impl.ScopedElasticsearchAnalyzerReference to org.hibernate.search.analyzer.impl.LuceneAnalyzerReference

@lgrignon
Copy link
Collaborator

lgrignon commented Nov 9, 2019

Sorry I didn't answer earlier.
Do you have any clue on how to fix this? This seems internal to Hibernate Search :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants