开发者

Solr thinks a string field is a multivalued. Why?

开发者 https://www.devze.com 2023-04-10 20:16 出处:网络
i\'m trying to index a field in solr which is a string which may contain commas. Solr doesn\'t care about the type string, and gives me this exception

i'm trying to index a field in solr which is a string which may contain commas.

Solr doesn't care about the type string, and gives me this exception

http://pas开发者_如何学Pythontie.org/2631085

(i'm running a custom plugin, that's why the unconventional error)

As you can see, "Charlotte, NC" should be a string (like there are many similars around being indexed without error) but solr wants me to put a multivalued field for it. Why?

I used CDATA on the xml and it fixes the problem, but i want to know why solr behaves like this. No manuals nor forum around seem to be any helpful!

Ty in advance

EDIT: this is the field definition in schema.xml

<fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
<field name="location" type="string" indexed="true" stored="true" />
0

精彩评论

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

关注公众号