Git Product home page Git Product logo

Comments (6)

lionsoul2014 avatar lionsoul2014 commented on May 25, 2024

看到了图片,不太明白你demo图片检索输入的是什么,就“理解“?

我自己也用的es,没有出现高亮的问题,我是直接把html先去掉了然后送到es去索引,你也可以试试。

至于html_strip的高亮错误应该配置的原因,因为给定了输入流Jcseg是可以准确的返回返回词条的位置,另外尝试下term_vector=with_positions_offsets高亮机制,也就是通过词条位置的机制来高亮!

另外jcseg会自动英文转成小写,所以lowercase的filter可以不需要!

from jcseg.

AnyListen avatar AnyListen commented on May 25, 2024

@lionsoul2014 图片检索词为“理想”;
在搜索结果第一条可以看到正文里面前面为<正>,然后这一条高亮部分全部向左偏移了2个字符;
搜索结果第二条,由于没有出现html标签,所以没有出现偏移;

直接去掉html标签固然可行;
但是jcseg与html_strip搭配情况下,应该是造成了偏移问题;

lowercase的多谢提示
建议考虑一下从代码上避免这种问题吧,目前我的term_vector=yes

from jcseg.

AnyListen avatar AnyListen commented on May 25, 2024

@lionsoul2014 该问题先Close吧,我后面跟踪一下,看看其他分词插件是否也有同样问题;
如果其他分词插件不存在偏移问题,那jcseg还是要从自身把这个问题解决一下;
否则,就是我个人配置不规范啦;
还有就是2.0版本大概什么时候发布

from jcseg.

lionsoul2014 avatar lionsoul2014 commented on May 25, 2024

2.0昨儿发布了

from jcseg.

lionsoul2014 avatar lionsoul2014 commented on May 25, 2024

html_strip这个问题还得深入挖下,因为Jcseg无非就是拿到他去掉html后的字符流进行分析,得到的词条的位置自然是去掉html后的偏移位置。
在solr中配合html_strip使用是可以的!

from jcseg.

lionsoul2014 avatar lionsoul2014 commented on May 25, 2024

行,有啥进展post一下

from jcseg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.