Skip to content

vshlos/elasticsearch-sharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Lightweight elastic search driver for c#.

Gives you the ability to create a collection of objects, then add, remove, and search items in that field.

You can use either strongly typed objects, or anonymous types to create the query.

`
var conn = new ElasticSearchSharp.ElasticSearchConnection();
var collection = new ElasticSearchSharp.ElasticSearchCollection<TestObject>(conn);


var query = new {
	query = new {
		text = new {text = "hello world"};
	}

}

var items = collection.Find(query);


`

Working on adding features to support linq. This will allow you to query in such a way:


`
var conn = new ElasticSearchSharp.ElasticSearchConnection();
var collection = new ElasticSearchSharp.ElasticSearchCollection<TestObject>(conn);

var items = from item in collection
			where item.Text.Contains("hello world")
			select new {Text = item.Text};


`

About

ElasticSearch for c#

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages