diff --git a/src/Plugin/search_api/backend/SearchApiSolrBackend.php b/src/Plugin/search_api/backend/SearchApiSolrBackend.php
index e3bef6f..fc8e242 100644
--- a/src/Plugin/search_api/backend/SearchApiSolrBackend.php
+++ b/src/Plugin/search_api/backend/SearchApiSolrBackend.php
@@ -2115,7 +2115,12 @@ class SearchApiSolrBackend extends BackendPluginBase implements SolrBackendInter
     switch ($operator) {
       case '<>':
         if (is_null($value)) {
-          return $this->queryHelper->rangeQuery($field, NULL, NULL);
+          if ('location' == $index_field->getType()) {
+            return $field . ':[0,-180 TO 90,180]';
+          }
+          else {
+            return $this->queryHelper->rangeQuery($field, NULL, NULL);
+          }
         }
         else {
           return '(*:* -' . $field . ':'. $this->queryHelper->escapePhrase($value) . ')';
diff --git a/tests/src/Kernel/SearchApiSolrLocationTest.php b/tests/src/Kernel/SearchApiSolrLocationTest.php
index b958891..33ffcc3 100644
--- a/tests/src/Kernel/SearchApiSolrLocationTest.php
+++ b/tests/src/Kernel/SearchApiSolrLocationTest.php
@@ -123,6 +123,13 @@ class SearchApiSolrLocationTest extends SolrBackendTestBase {
    * Tests location searches and distance facets.
    */
   public function testBackend() {
+    // Regression test.
+    // @see https://www.drupal.org/project/search_api_solr/issues/2921774
+    $query = $this->buildSearch(NULL, [], NULL, TRUE);
+    $query->addCondition('location', NULL, '<>');
+    $result = $query->execute();
+    $this->assertResults([1, 2, 3], $result, 'Search for all documents having a location');
+
     // Search 500km from Antwerp.
     $location_options = [
       [
