修改了search功能的filed后,重新启动opencms,在opencms的logs里面发现:
Caused by: org.xml.sax.SAXParseException: The content of element type "field" is incomplete, it must match "(mapping)+".
这个错误。
在opencms-search.xml里面找找看有没有类似这样的代码:
<field name="myproperty" display="myproperty" store="true" index="true"/>
这是opencms的一个bug,有时候设置search field,opencms会改坏opencms-search.xml,不知道新版有没有这样的问题。