Stack Exchange
Combining BoolQueryDescriptor in Nest 2.x
The following code has two variables of type BoolQueryDescriptor. The repective variables have their own different Must, MustNot, Filter parts in them.
Is there a way to combine all the respective Must(s) , Filters , MustNot(s) from each of the variables into a BoolQueryDescriptor variable and feed to final query or Boolquery.
BoolQueryDescriptor<Requote> queryParameter = null;
BoolQueryDescriptor<Requote> queryParameterMultiple = null;

queryParameter = QueryFilterBuilder.BuildQueryFilter<Requote>(group);
queryParameterMultiple = QueryFilterBuilder.BuildQueryFilterForMultipleInputValues<Requote>(group);


Var searchResult = elasticClient.Search<Requote>(query => query.Query(q => q.Bool(b => queryParameter)).Index(IndexConstants.Requote).Size(searchInputs.ResultCount).From(searchInputs.From).Sort(s => s.Field(sortField, sortOrder)));


Since a BoolQueryDescriptor<T> implements IBoolQuery explicitly, you can cast each descriptor to IBoolQuery and combine the clauses into a new BoolQueryDescriptor<T>
public static BoolQueryDescriptor<T> CombineBoolQueryDescriptors<T>(params BoolQueryDescriptor<T>[] queries) where T : class
{
    var descriptor = new BoolQueryDescriptor<T>();
    var combinedQuery = (IBoolQuery)descriptor;

    foreach (var query in queries.Cast<IBoolQuery>())
    {
        if (query.Must != null)
        {
            combinedQuery.Must = combinedQuery.Must != null 
                ? combinedQuery.Must.Concat(query.Must)
                : (query.Must.ToArray());
        }
        if (query.Should != null)
        {
            combinedQuery.Should = combinedQuery.Should != null
                ? combinedQuery.Should.Concat(query.Should)
                : (query.Should.ToArray());
        }

        if (query.MustNot != null)
        {
            combinedQuery.MustNot = combinedQuery.MustNot != null
                ? combinedQuery.MustNot.Concat(query.MustNot)
                : (query.MustNot.ToArray());
        }

        if (query.Filter != null)
        {
            combinedQuery.Filter = combinedQuery.Filter != null
                ? combinedQuery.Filter.Concat(query.Filter)
                : (query.Filter.ToArray());
        }
    }

    return descriptor;
}

You will need to decide how other properties such as .Boost(), .MinimumMustMatch(), Strict(), .Verbatim(), etc. should be applied to the new combined bool query.
An example
var bool1 = new BoolQueryDescriptor<Document>()
    .Must(
        m => m.Term("field", "value"),
        m => m.Match(match => match.Query("query").Field("field"))
    );

var bool2 = new BoolQueryDescriptor<Document>()
.Must(
    m => m.Term("field1", "value1"),
    m => m.Match(match => match.Query("query1").Field("field1"))
);

var combined = CombineBoolQueryDescriptors(bool1, bool2);

client.Search<Document>(s => s.Query(q => q.Bool(b => combined)));

yields
{
  "query": {
    "bool": {
      "must": [
        {
          "term": {
            "field": {
              "value": "value"
            }
          }
        },
        {
          "match": {
            "field": {
              "query": "query"
            }
          }
        },
        {
          "term": {
            "field1": {
              "value": "value1"
            }
          }
        },
        {
          "match": {
            "field1": {
              "query": "query1"
            }
          }
        }
      ]
    }
  }
}


Here descriptor.Must(query.Must.ToArray()); will override the previous entry added.

@PavankumarG you're right, my apologies. Will update now :)

Thanks for the Update
