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

时间:2022-04-01 18:02:11

I just installed Solr and Haystack for a Django project I'm working on. Following this Haystack tutorial I created a schema.xml but I'm not sure where to place it in the Solr installation.

我刚刚为我正在研究的Django项目安装了Solr和Haystack。在这个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使用它?

2 个解决方案

#1


7  

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

#2


1  

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复制到的位置。

#1


7  

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

#2


1  

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复制到的位置。