Access Elastic via .NET

Hi everyone

I need to query our elastic search and pull some data from it.
I read about about couple of ways to to it. What I tried so far is to Use NEST to query elastic:
var response = client.Get(10, idx => idx.Index("graylog_*"));
var searchResponse = client.Search(s => s
.From(0)
.Size(1000)
.Scroll("10m")
.Query(q => q
.Match(m => m
.Field(f => f.AccountName)
.Query("SOME USER")
)
)
);
But the result are empty all the time
if I query another field (instead of AccountName )like source (source of computer name)
I get result.
I created a class for the data (and from the properties are from there) :
image

Thanks for help!

Hello Amit

I made some examples of queries on github using NEST in .net core, take a look there if it helps: https://github.com/hgmauri/elasticsearch-with-nest

I believe you can use MatchPhrasePrefix

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