如何将.xml格式的Wikipedia文件编入solr [英] How to index wikipedia files in .xml format into solr

查看:78
本文介绍了如何将.xml格式的Wikipedia文件编入solr的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将Wikipedia的xml文件编入Solr.

I want to index xml files of Wikipedia into Solr.

但是我遇到一个错误,它无法编制索引. Solr具有xml文件的特定格式.我更改了schema.xmldata-config.xml文件以适合Wikipedia文件的标签.

But I am getting an error, it is unable to index. Solr has a specific format for xml files. I changed the schema.xml and data-config.xml files to suit the tags of the wikipedia files.

仍然无法索引文件.我的实际意图是索引Wikipedia,这是一个30 GB的xml文件.

Still it is unable to index the files. My actual intention is to index wikipedia which is an xml file of 30 GB.

我该如何将所有维基百科文件索引到Solr中?

How would I go about indexing all wikipedia files into Solr?

推荐答案

有一个示例部分完全是DataImportHandler文档中的内容:为Wikipedia编制索引.

There's an example section in the DataImportHandler documentation for exactly this: indexing Wikipedia.

基本上,您使用DataImportHandler和一些XPath从Wikipedia XML中提取您关心的元数据,并将其放在平坦的Solr字段列表中.

Basically, you use the DataImportHandler and some XPath to pull the metadata you care about out of the Wikipedia XML, and put it in flat Solr field listings.

这篇关于如何将.xml格式的Wikipedia文件编入solr的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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