简体   繁体   English

在Apache Solr中的哪里存储架构?

[英]Where to store schema in Apache Solr?

Beginner learning how to use Apache Solr. 初学者学习如何使用Apache Solr。 Using "Indexing data" section this tutorial. 教程中使用“索引数据”部分。

I am unable to index my "custom made XML files" to Apache Solr. 我无法将我的“定制XML文件”索引到Apache Solr。 However, there is no problem in indexing the example xml files that come with Apache Solr distribution package. 但是,索引Apache Solr分发软件包随附的示例xml文件没有问题。 I am new to XML and so I only know about the concept of XML Schema. 我是XML的新手,所以我只了解XML Schema的概念。

How to post my custom files ? 如何发布我的自定义文件? Where does Apache Solr store xml schemas ? Apache Solr在哪里存储xml模式? How to add an XML Schema to server ? 如何向服务器添加XML模式?

Any help is appreciated. 任何帮助表示赞赏。

Solr uses a special XML format for creating the documents. Solr使用一种特殊的XML格式来创建文档。 You can't just send an XML document to Solr and expect it to parse it. 您不能只是将XML文档发送到Solr并期望它进行解析。

But you could use DataImportHandler to read XML file from disk and map specific fields. 但是您可以使用DataImportHandler从磁盘读取XML文件并映射特定字段。 There is an example in the Solr distribution, under example-DIH (rss example). Solr发行版中有一个示例,位于example-DIH(rss示例)下。

RSS example loads content from URL. RSS示例从URL加载内容。 To load from the file, see the file-specific example on GitHub from my book. 要从文件加载,请参阅我的书在GitHub上特定于文件的示例

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM