可以使用Solr或Lucene搜索XML吗? [英] Can Solr or Lucene be used for searching XML?

查看:88
本文介绍了可以使用Solr或Lucene搜索XML吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用XML标记的信息数据库. XML表示我想在搜索和查询中考虑的层次结构.例如,如果数据是书籍元数据:

I have a database of information that is tagged using XML. The XML represents a hierarchy that I would like to account for in search and query. For example, if the data is book metadata:

<book>
    <author id="jd112">John Doe</author>
    <title>John's First Publication</title>
    <summary>This is a mundane memoir of John's life that no one else would care to read </summary>
</book>

我将拥有大量此类XML文档.我希望搜索者将查询限制为特定字段.我也想允许搜索者对它们进行逻辑组合.

I'll have tons of such XML documents. I would like searchers to restrict queries to specific fields. I would like to also allow searchers to do logical combinations of those.

Lucene/Solr是否提供这种功能,还是我应该考虑其他技术? 如果是Lucene,那么指向我可能会如何做的指针将是有帮助的.

Does Lucene/Solr provide such an ability, or should I be looking at some other technology? If Lucene it is, a pointer to how I might go about this would be helpful.

感谢您的见解.

-Raj

推荐答案

是的,这是使用它的最佳方法,但是文档应该重新格式化

Yes, and it is the best way to use it, but documents should be reformatted possibly

http: //www.xml.com/pub/a/2006/08/09/solr-indexing-xml-with-lucene-andrest.html

和google有关配置schema.xml

and google about configuring schema.xml

这篇关于可以使用Solr或Lucene搜索XML吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆