---
title: "Discussion on \"Sitecore ContentSearch - Filtering by null and empty strings\" | Hashnode"
description: "Discussion on \"Sitecore ContentSearch - Filtering by null and empty strings\". By default Sitecore will not save null and empty strings in your indexes as it wastes space.\nHowever, you might need to do something like this:\nusing (var context = ContentSearchManager.GetIndex(\"MyIndex\").CreateSearchContext())\n{\n    var query = con..."
url: "https://hashnode.com/posts/sitecore-contentsearch-filtering-by-null-and-empty-strings/628e289943220290a7eea955"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Sitecore ContentSearch - Filtering by null and empty strings](https://blog.krusen.dk/sitecore-contentsearch-filtering-by-null-and-empty-strings?utm_source=hashnode&utm_medium=feed)

By default Sitecore will not save null and empty strings in your indexes as it wastes space. However, you might need to do something like this: using (var context = ContentSearchManager.GetIndex("MyIndex").CreateSearchContext()) { var query = con...

Sep 15, 2015 · 2 min read · blog.krusen.dk  
Read the article

## Written by

[Søren Kruse](https://hashnode.com/@Krusen)

@Krusen · Odense, Denmark

  
[View profile](https://hashnode.com/@Krusen)

Tech Lead @ IMPACT Commerce

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
