简体   繁体   中英

Solr won't add my fields : schema.xml

I am working with Solr 5.2.1 , i got everything working fine but i can't add field to index. Here is my schema.xml

      <schema name="example" version="1.5"> 
<fields>
    <field name="COTID" type="string" indexed="true" stored="true" required="true"/>
     <field name="COTREF" type="string" indexed="true" stored="true" required="true" multiValued="false"/>
    <field name="COTTYPEREF" type="string" indexed="true" stored="true" required="true" multiValued="false"/>
    <field name="COTTYPE" type="string" indexed="true" stored="true" required="true" multiValued="false"/>
     <field name="COTTEXTE" type="string" indexed="true" stored="true" required="false" multiValued="true"/>
</fields>
<uniqueKey>COTID</uniqueKey>
<types>
<fieldType name="string" class="solr.StrField" sortMissingLast="true"/>
<fieldType name="date" class="solr.TrieDateField" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="long" class="solr.TrieLongField" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">
<!-- lots of details -->
</fieldType>
<fieldType name="currency" class="solr.CurrencyField" precisionStep="8" defaultCurrency="USD" currencyConfig="currency.xml"/>
</types>
</schema>

can you help please ? Thanks

If you modify any of Solr configuration files you need to Restart your Solr so that it starts according to your configuration setting. you should restart Solr or reload your core and check what error you are getting.

(refer below URL, change URL names according to you) to reload core

http://127.0.0.1:8080/solr/admin/cores?action=RELOAD&core=core1

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