简体   繁体   中英

Apache solr collection

Hi I am new to apache solr so bear with me. I am trying to create a collection/core that remains on my admin page every time I load Solr 4.10.4 on my Mac. Currently I have to make a new core every time I open up the Solr Admin page.

Currently, I have my solrconfig.xml, schema.xml and solr.xml file and they look as follows.

Solrconfig.xml:

<?xml version="1.0" encoding="UTF-8" ?>
<config>
<luceneMatchVersion>LUCENE_43</luceneMatchVersion>
<requestDispatcher handleSelect="false">
<httpCaching never304="true" />
</requestDispatcher>
<requestHandler name="/select" class="solr.SearchHandler" />
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
<requestHandler name="/admin" class="solr.admin.AdminHandlers" />
<requestHandler name="/analysis/field" class="solr.
FieldAnalysisRequestHandler" startup="lazy" />
</config>

Schema.xml:

<?xml version="1.0" encoding="UTF-8" ?>
<schema version="1.5">
<fields>
<field name="id" type="string" indexed="true" stored="true"
required="true"/>
<field name="addr_from" type="string" indexed="true"
stored="true" required="true"/>
<field name="addr_to" type="string" indexed="true"
stored="true" required="true"/>
<field name="subject" type="string" indexed="true"
stored="true" required="true"/>
</fields>
<uniqueKey>id</uniqueKey>
<types>
<fieldType name="string" class="solr.StrField" />
</types>
</schema>

Solr.xml:

<?xml version="1.0" encoding="UTF-8" ?>
<collection2>
<schema version="1.5">
<fields>
<field name="id" type="string" indexed="true" stored="true"
required="true"/>
<field name="addr_from" type="string" indexed="true"
stored="true" required="true"/>
<field name="addr_to" type="string" indexed="true"
stored="true" required="true"/>
<field name="subject" type="string" indexed="true"
stored="true" required="true"/>
</fields>
<uniqueKey>id</uniqueKey>
<types>
<fieldType name="string" class="solr.StrField" />
</types>
</schema>


<solr persistent="true">

Thanks!

I found the issue! The problem was within the version 4.10.4, once I updated it and used Solr version 6.1.0 and used the Solr Tutorial the problem was fixed. Thanks for the help!

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