简体   繁体   English

solr + haystack + django我在哪里放置schema.xml?

[英]solr + haystack + django where do I place schema.xml?

I just installed Solr and Haystack for a Django project I'm working on. 我刚刚为我正在研究的Django项目安装了SolrHaystack Following this Haystack tutorial I created a schema.xml but I'm not sure where to place it in the Solr installation. 这个 Haystack教程之后,我创建了一个schema.xml,但我不确定将它放在Solr安装中的哪个位置。

My Solr installation is in a directory like this: /solr and I'm starting the Solr service from /solr/example with this command java -jar start.jar . 我的Solr安装在这样的目录中: /solr我正在使用此命令java -jar start.jar/solr/example启动Solr服务。

Any ideas where to place that schema.xml and how to tell Solr to use it? 有什么想法放置schema.xml以及如何告诉Solr使用它?

Solr looks for schema.xml in the ./conf directory under the "Solr home" directory. Solr在“Solr home”目录下的./conf目录中查找schema.xml。

See this page for more info. 有关详细信息,请参阅此页面。

http://wiki.apache.org/solr/ConfiguringSolr http://wiki.apache.org/solr/ConfiguringSolr

It has to do with the details of the core your've created. 它与您创建的核心细节有关。 Ideally the first step of using solr would be creating your core like this 理想情况下,使用solr第一步就是像这样创建你的核心

./bin/solr create -c haystack where haystack is the name of your core ./bin/solr create -c haystack其中haystack是你的核心名称

Now you can see a new directory has been created as ./server/solr/haystack/conf which is where schema.xml should be copied into. 现在您可以看到一个新目录已创建为./server/solr/haystack/conf ,这是应该将schema.xml复制到的位置。

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

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