title: "Dynamically" creating a filter in NEST
body: <p>I have an interesting challenge, which I think there is an easy answer to.</p>
  
  <p>I know that NEST filters work correctly when syntactically you do something like this:</p>
  
  <pre><code>var andFilter = FilterFactory.AndFilter(
                      FilterFactory.TermFilter("name.first", "shay1"),
                      FilterFactory.TermFilter("name.first", "shay4")
                  );
  </code></pre>
  
  <p>My base services should allow an the caller to pass in some sort of enumerable list of items to filter.</p>
  
  <p>I'd basically like to be able programmatically achieve something like this (filters is passed into the method):</p>
  
  <pre><code>var andFilter = new FilterDescriptor();
  foreach (var filter in filters) 
  {
       andFilter = filter concatenated to andFilter
  }
  </code></pre>
  
  <p>In other words if I passed in an array of { {"first.name", "joe"}, {"first.name", "jim"}, {"first.name", "frank"}} I would like to produce the equivalent of </p>
  
  <pre><code>var andFilter = FilterFactory.AndFilter(
                      FilterFactory.TermFilter("name.first", "joe"), 
                      FilterFactory.TermFilter("name.first", "joe"),
                      FilterFactory.TermFilter("name.first", "frank")
                  );
  </code></pre>