# Can you use wild cards (\*) or blank/null values when filtering?

**URL:** <https://community.swiftype.com/t/can-you-use-wild-cards-or-blank-null-values-when-filtering/426>\
**Category:** Helpline\
**Created:** [August 18, 2017, 4:38pm UTC](https://community.swiftype.com/t/can-you-use-wild-cards-or-blank-null-values-when-filtering/426 "2017-08-18T16:38:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mzens](https://sea1.discourse-cdn.com/flex019/user_avatar/community.swiftype.com/mzens/32/100_2.png) [@mzens](https://community.swiftype.com/u/mzens)\
**Post date:** [August 18, 2017, 4:38pm UTC](https://community.swiftype.com/t/can-you-use-wild-cards-or-blank-null-values-when-filtering/426/1 "2017-08-18T16:38:26Z")

</div>

I need to be able to filter by a wildcard or if the field is blank. Is this possible?

```auto
$('.element').swiftypeSearch({
  ...
  filters: {
    page_type: ['*', 'resource', ''],
  }
  ...
});

```

---

<div class="post-metadata">

**Author:** ![mike](https://sea1.discourse-cdn.com/flex019/user_avatar/community.swiftype.com/mike/32/37_2.png) [@mike](https://community.swiftype.com/u/mike)\
**Post date:** [August 21, 2017, 5:17pm UTC](https://community.swiftype.com/t/can-you-use-wild-cards-or-blank-null-values-when-filtering/426/2 "2017-08-21T17:17:05Z")

</div>

Great question! It’s not possible to filter via a wildcard or null value, but you can use the bang operator to request results that do not match to the stated value or array. For example, if you have 2 `page_type` values (resource & category) and want to return only content with no set `page_type value`, you’d declare the filter option like so:  
​

```auto
filters: {
     "YOUR_DOC_TYPE": {
          "page_type": ["!resource", "!category"]
     }
}

```

---

<div class="post-metadata">

**Author:** ![webdev1](https://avatars.discourse-cdn.com/v4/letter/w/ed8c4c/32.png) [@webdev1](https://community.swiftype.com/u/webdev1)\
**Post date:** [October 31, 2017, 6:35pm UTC](https://community.swiftype.com/t/can-you-use-wild-cards-or-blank-null-values-when-filtering/426/3 "2017-10-31T18:35:32Z")

</div>

Any plans on adding support for wildcards or NULL values? I’m especially interested in NULL value support. The engine I am setting up could benefit from hiding search results that don’t have values defined for particular field(s). For example, if a page does not have a custom field defined in its meta tags, and that field does not exist in the JSON object.

Thanks!

---

<div class="post-metadata">

**Author:** ![mike](https://sea1.discourse-cdn.com/flex019/user_avatar/community.swiftype.com/mike/32/37_2.png) [@mike](https://community.swiftype.com/u/mike)\
**Post date:** [November 1, 2017, 5:16pm UTC](https://community.swiftype.com/t/can-you-use-wild-cards-or-blank-null-values-when-filtering/426/4 "2017-11-01T17:16:57Z")

</div>

Nothing on the roadmap just yet to filter out document records that are absent a specific field or contain no values for that field. I’ll log the feedback to JIRA though. 🙂

---

<div class="post-metadata">

**Author:** ![webdev1](https://avatars.discourse-cdn.com/v4/letter/w/ed8c4c/32.png) [@webdev1](https://community.swiftype.com/u/webdev1)\
**Post date:** [November 1, 2017, 5:58pm UTC](https://community.swiftype.com/t/can-you-use-wild-cards-or-blank-null-values-when-filtering/426/5 "2017-11-01T17:58:42Z")

</div>

Much appreciated!😃

Do you publish the current development roadmap anywhere?

Thank you.

---

<div class="post-metadata">

**Author:** ![micah.herstand](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@micah.herstand](https://community.swiftype.com/u/micah.herstand)\
**Post date:** [September 4, 2018, 10:31pm UTC](https://community.swiftype.com/t/can-you-use-wild-cards-or-blank-null-values-when-filtering/426/6 "2018-09-04T22:31:21Z")

</div>

I would also very much appreciate the null value filtering. Any progress on this? Thanks!

---

<div class="post-metadata">

**Author:** ![sdhardesty](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@sdhardesty](https://community.swiftype.com/u/sdhardesty)\
**Post date:** [September 7, 2018, 7:26pm UTC](https://community.swiftype.com/t/can-you-use-wild-cards-or-blank-null-values-when-filtering/426/7 "2018-09-07T19:26:31Z")

</div>

We could really use this functionality as well.
