开发者

addField in SolrInputDocument

开发者 https://www.devze.com 2023-02-10 18:32 出处:网络
When I add field addField(\"category\",\"cat1\"); it doesn\'t appear in the search result xml , and there\'s just 2 fields to be added which is \"id\" and \"name\" , could any body tell me how to add

When I add field addField("category","cat1"); it doesn't appear in the search result xml , and there's just 2 fields to be added which is "id" and "name" , could any body tell me how to add another field and to appear in the xml result 开发者_运维技巧


Define the field you want to add in schema.xml and make multivalued true in the case of using "ADDFIELD".


in your schema.xml, if you set a field as "stored", it will show up in the results

    <field name="internal_id" type="string" indexed="true" stored="true"/>
    <field name="desc" type="text" indexed="true" stored="true"/>
0

精彩评论

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

关注公众号