mty2015 / elasticsearch-analysis-jieba Goto Github PK
View Code? Open in Web Editor NEW基于jieba的elasticsearch中文分词插件
License: Apache License 2.0
基于jieba的elasticsearch中文分词插件
License: Apache License 2.0
在使用的过程中,发现高亮的位置有偏差,有时候会导致如下异常
[2018-07-26T03:40:01,325][DEBUG][o.e.a.s.TransportSearchAction] [NrQM_jh] [31209] Failed to execute fetch phase
org.elasticsearch.transport.RemoteTransportException: [NrQM_jh][127.0.0.1:9300][indices:data/read/search[phase/fetch/id]]
Caused by: org.elasticsearch.search.fetch.FetchPhaseExecutionException: Fetch Failed [Failed to highlight field [Content]]
at org.elasticsearch.search.fetch.subphase.highlight.FastVectorHighlighter.highlight(FastVectorHighlighter.java:212) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.search.fetch.subphase.highlight.HighlightPhase.hitExecute(HighlightPhase.java:124) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.search.fetch.FetchPhase.execute(FetchPhase.java:161) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:421) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.action.search.SearchTransportService$12.messageReceived(SearchTransportService.java:402) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.action.search.SearchTransportService$12.messageReceived(SearchTransportService.java:399) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:69) ~[elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.transport.TransportService$7.doRun(TransportService.java:627) [elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:638) [elasticsearch-5.4.1.jar:5.4.1]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-5.4.1.jar:5.4.1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_171]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_171]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171]
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -137
我在基于jieba.Net的基础上继承到Lucene.Net上也遇到一样的问题。
put jieba-test
{
"settings": {
"analysis": {
"analyzer": {
"my_ana": {
"tokenizer": "jieba_index",
"filter": [
"lowercase"
]
}
}
}
}
}
报错如下
{
"error" : {
"root_cause" : [
{
"type" : "illegal_argument_exception",
"reason" : "Custom Analyzer [my_ana] failed to find tokenizer under name [jieba_index]"
}
],
"type" : "illegal_argument_exception",
"reason" : "Custom Analyzer [my_ana] failed to find tokenizer under name [jieba_index]"
},
"status" : 400
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.