title: Using RediSearch with NRediSearch (C#), how to apply OR clause on two numeric fields like i.CountyId == id || i.CityId == id
body: <p>I am developing a <code>.Net Core</code> web app with RediSearch. Previously I have used in-app memory cache, but I have to change it to distributed cache. The issue is, the web app has very complex searches which must be handled from cache. I though I just move the cache to <code>Redis</code> and must filter in <code>Linq</code> will stay the same just as with in-app memory cache, but if you have 500K+ entries in Redis, using a docker image on the same host took around 4 sec just to load these entries into a variable so this is not an option.</p>
  <p>I have now implemented <code>RediSearch</code> with <code>NRediSearch</code> which seem to handle the load pretty well. The issue I have now, I have a search with multiple location fields.</p>
  <p>Example</p>
  <pre><code>class Item{
      public int Id {get;set;}
      public int CountyId {get;set;}
      public int CityId {get;set;}
  }
  class Location{
      public int LocationId {get;set;}
      public bool IsCounty {get;set;}
  }
  </code></pre>
  <p>I need to translate the following <code>Linq</code> command into <code>RediSearch</code></p>
  <pre><code>public List&lt;Item&gt; Search(List&lt;Location&gt; location){
      var result = items.Where(i =&gt; location.Any(l =&gt; l.IsCounty &amp;&amp; l.Id == i.CountyId) || location.Any(l =&gt; !l.IsCounty &amp;&amp; i.CityId == l.Id))
  }
  </code></pre>
  <p>I have read the <code>RediSearch</code> documentation, but have not found any answer yet. I have to do this in one search because of sorting.</p>