This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var connectionSettings = new ConnectionSettings("127.0.0.1.", 9200).SetDefaultIndex("mpdreamz"); | |
var client = new ElasticClient(connectionSettings); | |
var blogPost = new Blog() | |
{ | |
Id = 10, | |
Body = StaticData.RandomString(StaticData.RandomNumber(10, 1000)), | |
Title = StaticData.RandomString(StaticData.RandomNumber(4, 20)), | |
Author = persons[StaticData.RandomNumber(0,29)] | |
}; | |
client.IndexSync(blogPost); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QueryString qs = new QueryString("John Doe AND New York City") | |
.SetAllowLeadingWildcard(false) | |
.SetFields(new List<Field> | |
{ | |
new Field("firstName", 2.0), | |
new Field("city", 0.5) | |
}) | |
.SetFuzzyMinimumSimilarity(0.1); |
NewerOlder