lucene 和本体论
我对 Lucene 没有太多经验,但我需要完成一项研究。 我想使用基于本体的Lucene索引。所以,我需要任何建议,我应该使用什么,如何将 Lucene 与本体领域结合起来等等。
谢谢,
- 幸运儿
I do not have much experience with Lucene, but I need to finish a research.
I want to use Lucene indexing based on ontology. So, I need any kind of advice, what should I use, how to combine Lucene with ontology domain and things like that.
Thanks,
- Lucky
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 Lucene 中,您可能会这样做,
假设这三个字段不应被某些分析器分解为组成项;如果这不是正确的假设,请将最后一个参数更改为
Field.Index.ANALYZED
。Solr 等效项(如果您不分析字段,这可能更有意义)
在 Solr 中,服务器端配置确定存储哪些字段、如何解析它们等。
在每种情况下,您都需要弄清楚如何为每个元组创建唯一的 id。一种方法是生成三个值的串联(带分隔符)的哈希值。
In Lucene, you might do something like
This assumes that the three fields should not be decomposed into constituent terms by some Analyzer; if that's not a correct assumption, change the last parameter to
Field.Index.ANALYZED
.The Solr equivalent (which might make more sense if you are not analyzing the fields, would be
In Solr, the server-side configuration determines which fields are stored, how they are parsed, etc.
In each case, you will need to figure out how to create a unique id for each Tuple. One way to do it is to generate a hash of the concatenation (with delimiters) of the three values.