问题
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