简体   繁体   中英

Where to store schema in Apache Solr?

Beginner learning how to use Apache Solr. Using "Indexing data" section this tutorial.

I am unable to index my "custom made XML files" to Apache Solr. However, there is no problem in indexing the example xml files that come with Apache Solr distribution package. I am new to XML and so I only know about the concept of XML Schema.

How to post my custom files ? Where does Apache Solr store xml schemas ? How to add an XML Schema to server ?

Any help is appreciated.

Solr uses a special XML format for creating the documents. You can't just send an XML document to Solr and expect it to parse it.

But you could use DataImportHandler to read XML file from disk and map specific fields. There is an example in the Solr distribution, under example-DIH (rss example).

RSS example loads content from URL. To load from the file, see the file-specific example on GitHub from my book.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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