title: How to add conditional properties for index creation in elasticsearch nest?
body: <p>I want to create index with some condition,like with querycontainer to add conditional filters.</p>
  
  <pre><code>PropertiesDescriptor&lt;object&gt; ps = new PropertiesDescriptor&lt;object&gt;();
              if (condition)
              {
                  ps.Text(s =&gt; s.Name(name[1]));
              }
              if(condition)
              {
                  ps.Number(s =&gt; s.Name(name[1]));
              }
              if (!_con.client.Indices.Exists(indexname).Exists)
              {
                  var createIndexResponse = _con.client.Indices.Create(indexname, index =&gt; index.Settings(s =&gt; s.NumberOfShards(1).NumberOfReplicas(0))
                                                                                                  .Map(m=&gt;m.Properties(ps)));
              }
  </code></pre>
  
  <p>But i receive following error, can you guide me how to acheive this.</p>
  
  <pre><code>cannot convert from 'Nest.PropertiesDescriptor&lt;object&gt;' to 'System.Func&lt;Nest.PropertiesDescriptor&lt;object&gt;, Nest.IPromise&lt;Nest.IProperties&gt;&gt;'
  
  </code></pre>