Skip to content

Solr Tips

Dolsy Smith edited this page Aug 7, 2024 · 1 revision

Querying for missing text-valued fields

For instance, to find documents that belong to an admin set but that are missing a license field, you can use the following query: q="admin_set_tesim:['' TO *]"&fq="-license_tesim:['' TO *]"

  • The q value finds any value in the admin_set_tesim field, as long as the field exists.
  • The fq (filter query) value excludes records that have any value in the license_tesim field (i.e., where it exists)`