[TestMethod] public void Analyze () {string[] D = Mindex.analyze ("C # socket", "IK"); } [TestMethod] public void match () {ilist<blog> items = mindex.query<blog> (q = = Q.match (new searchmatch {field = "title", query = "C # socket"}); } [TestMethod] public void querytring () {ilist<blog> items = MINDEX.QUERY<BLOG&G t; (q = q.querystring (new QueryString {fields = new string[] {"title", "description"}, query = "C # socket"}); } [TestMethod] public void Match_all () {ilist<blog> items = Mindex.query<blo g> (q = Q.match_all ()); } [Indextype ("blog")] public class Blog {[ID] [Column (Type = Columntype._strin G, Store = true, Index = indextype._not_analyzed)] public string ID {get; set;} [Column (Type = columntype._string, Indexanalyzer = ")Ik ", Searchanalyzer =" ik ")] public string title {get; set;} [Column (Type = columntype._string, Index = indextype._no)] public string URL {get; set;} [Column (Type = columntype._string)] public string Author {get; set;} [Column (Type = columntype._string, Indexanalyzer = "Ik", Searchanalyzer = "ik")] public string Description {ge T Set } [Column (Type = columntype._string, Index = indextype._no)] public string content {get; set;} [Column (Type = columntype._date, Index = indextype._not_analyzed)] public DateTime createtime {get; s Et } }
Write a Elasticsearch client library to simplify operations