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

Error when index database using analysis-vietnamese #10

Closed
idontgotit opened this issue Nov 3, 2015 · 1 comment
Closed

Error when index database using analysis-vietnamese #10

idontgotit opened this issue Nov 3, 2015 · 1 comment

Comments

@idontgotit
Copy link

First thanks to your plugin.
But i have some error when index database in it.
I use elasticsearch 1.7.0, and install success elasticsearch because test success
curl -XGET "http://localhost:9200/_analyze?analyzer=vi_analyzer&text="Công nghệ thông tin Việt Nam"

i tried set analyzer is defaul when creat new index , setting in elasticsearch.yml

############################## Index

index.analysis.analyzer.default.type : "vi_analyzer"

but if i tried index database, error happen:

[2015-11-03 17:21:28,194][DEBUG][action.bulk ] [Jarella] [users][4] failed to execute bulk item (index) index {[users][user][72], source[{"id":72,"user_name":"chùa Thầy Việt Nam Hà Tây","password":"Tây Hà","sex":"male","photo_id":1,"@Version":"1","@timestamp":"2015-11-03T10:21:26.234Z"}]}
java.lang.NullPointerException
at org.apache.lucene.analysis.vi.VietnameseTokenizer.(VietnameseTokenizer.java:74)
at org.apache.lucene.analysis.vi.VietnameseTokenizer.(VietnameseTokenizer.java:62)
at org.apache.lucene.analysis.vi.VietnameseAnalyzer.createComponents(VietnameseAnalyzer.java:83)
at org.apache.lucene.analysis.AnalyzerWrapper.createComponents(AnalyzerWrapper.java:113)
at org.apache.lucene.analysis.AnalyzerWrapper.createComponents(AnalyzerWrapper.java:113)
at org.apache.lucene.analysis.Analyzer.tokenStream(Analyzer.java:182)
at org.apache.lucene.document.Field.tokenStream(Field.java:554)
at org.apache.lucene.index.DefaultIndexingChain$PerField.invert(DefaultIndexingChain.java:611)
at org.apache.lucene.index.DefaultIndexingChain.processField(DefaultIndexingChain.java:359)
at org.apache.lucene.index.DefaultIndexingChain.processDocument(DefaultIndexingChain.java:318)
at org.apache.lucene.index.DocumentsWriterPerThread.updateDocument(DocumentsWriterPerThread.java:241)
at org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:465)
at org.apache.lucene.index.IndexWriter.updateDocument(IndexWriter.java:1526)
at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1252)
at org.elasticsearch.index.engine.InternalEngine.innerIndex(InternalEngine.java:432)
at org.elasticsearch.index.engine.InternalEngine.index(InternalEngine.java:364)
at org.elasticsearch.index.shard.IndexShard.index(IndexShard.java:511)
at org.elasticsearch.action.bulk.TransportShardBulkAction.shardIndexOperation(TransportShardBulkAction.java:413)
at org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:148)
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$PrimaryPhase.performOnPrimary(TransportShardReplicationOperationAction.java:574)
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$PrimaryPhase$1.doRun(TransportShardReplicationOperationAction.java:440)
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:36)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

But if try
$ curl -XPUT 'http://localhost:9200/users/user/72' -d '{
"user_name":"chùa Thầy Việt Nam Hà Tây",
"password":"Tây Hà",
"sex":"male",
"photo_id":1,
"@Version":"1",
"@timestamp":"2015-11-03T10:21:26.234Z"
}'

everything is ok ! Mapping properties still "type" : "string" and "analyzer" : "vi_analyzer"( hidden because is defaul, but can test)
I tried install plugin in version1.6 with elastic1.6 and issue still happen.

Thanks for your help!

@duydo
Copy link
Owner

duydo commented Aug 22, 2016

The issue has been fixed

@duydo duydo closed this as completed Aug 22, 2016
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