# Nest query no longer working in v7

**URL:** <https://discuss.elastic.co/t/nest-query-no-longer-working-in-v7/230135>\
**Category:** Elasticsearch\
**Created:** [April 28, 2020, 10:19am UTC](https://discuss.elastic.co/t/nest-query-no-longer-working-in-v7/230135 "2020-04-28T10:19:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adiksl](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@adiksl](https://discuss.elastic.co/u/adiksl)\
**Post date:** [April 28, 2020, 10:19am UTC](https://discuss.elastic.co/t/nest-query-no-longer-working-in-v7/230135/1 "2020-04-28T10:19:01Z")

</div>

I have upgraded my Elasticsearch v7 and installed the new Nest Nuget packages in dev studio but once I changed my code so it worked with Nest v7 the queries no longer return any hits.

```auto
            string url = "http://localhost:9200";

            var uri = new Uri(url);
            var settings = new ConnectionSettings(uri);
            try
            {
                settings.ThrowExceptions(alwaysThrow: true);
                settings.PrettyJson();
                Client = new ElasticClient(settings);
                var response = Client.Cluster.Health();
                elasticSearchStatusLabel.Text = response.Status.ToString();

                settings.DefaultIndex("auditlog");
            }
            catch (Exception excp)
            {
                MessageBox.Show("Error Connecting to Elastic Search" + Environment.NewLine + Environment.NewLine +
                    "Exception: " + excp.Message, "Error Connecting", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }

            List<AuditRecord> resultsList = new List<AuditRecord>();

            try
            {                
                resultsList = Client.SearchAsync<AuditRecord>(s => s
                    .From(0)
                    .Take(100)
                    .Query(qry => qry
                        .MatchAll()
                    )
                ).Result.Documents.ToList(); 
            }
            catch
            {
                resultsList = null;
            }

```

This use to load in to this class....

```auto
        public class AuditRecord
        {
            public string audit_Id { get; set; }
            public string audit_UserId { get; set; }
            public string audit_TimeStamp { get; set; }
            public string audit_Event { get; set; }
            public string audit_Application { get; set; }
            public string audit_Action { get; set; }
        }

```

The code doesn't error but also doesn't return any values. If the following query is run in Kibana then results are found.

```auto
GET auditlog/_search
{
  "query" : {
    "match_all": {}
  }
}

```

Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 26, 2020, 10:19am UTC](https://discuss.elastic.co/t/nest-query-no-longer-working-in-v7/230135/2 "2020-05-26T10:19:04Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
