SoLR - How to filter out records which do not have the field value for field listed in SORT?

我的未来我决定 提交于 2019-12-11 17:15:01

问题


In SoLR, We can set sortMissingLast=true on a field in the schema. If the SORT is on this field, it will to push the results which have missing field values to the end.

Is there a way to filter out the results whose sort field values are missing? Please advise.


回答1:


If you want to restrict your query to documents that only have a certain field set, add the following parameter to your query:

sort_field_name:[* TO *]

This will limit the query to only those documents where the sort field exists.



来源:https://stackoverflow.com/questions/24739090/solr-how-to-filter-out-records-which-do-not-have-the-field-value-for-field-lis

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!