开发者

Solr error, unknown field

开发者 https://www.devze.com 2023-02-16 05:43 出处:网络
I just started using Solr php client. First I defined a schema for my data that I want to add to the index

I just started using Solr php client. First I defined a schema for my data that I want to add to the index

<?xml version="1.0" encoding="UTF-8" ?>
<schema name="qullet" version="1.2">
    <fields>
        <field name="id" type="string" indexed="true" 
                   stored="true" required="true"/>
        <field name="title" type="string" indexed="true"
                   stored="true" required="true"/>
        <field name="description" type="text" indexed="true"
                   stored="true" required="true"/>
        <field name="test"开发者_StackOverflow社区 type="text" indexed="true"
                   stored="true" required="true"/>
    </fields>
    <uniqueKey>id</uniqueKey>
</schema>

Adding data to the index gives me the following error

"400" Status: ERRORunknown_field_test

If I remove the field test everything works fine.


You're missing the <fieldType>s. See the sample schema.xml for reference.

0

精彩评论

暂无评论...
验证码 换一张
取 消