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"/>
精彩评论