Skip to content

Instantly share code, notes, and snippets.

@bozhink
Created October 2, 2017 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bozhink/c6054d104c52306f38be38688633c53c to your computer and use it in GitHub Desktop.
Save bozhink/c6054d104c52306f38be38688633c53c to your computer and use it in GitHub Desktop.
// See https://github.com/elastic/elasticsearch-net/issues/2860
public class MyDocument
{
public string RecordType { get; set; }
}
var client = new ElasticClient();
client.Search<MyDocument>(s => s
.Index("ic")
.AllTypes()
.Query(q => q
.MatchPhrase(mp => mp
.Field(f => f.RecordType)
.Query("WealthEvent")
)
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment