解决方案:
<field>标签添加一个属性:sortMissingLast="true"
例子:
<field name="price" type="tdouble" indexed="true" stored="true" sortMissingLast="true"/>
不管是 :sort= price asc 还是 sort= price desc
没有值的记录都会排到最后。
解决方案:
<field>标签添加一个属性:sortMissingLast="true"
例子:
<field name="price" type="tdouble" indexed="true" stored="true" sortMissingLast="true"/>
不管是 :sort= price asc 还是 sort= price desc
没有值的记录都会排到最后。