Commit c5f64ae8 by mahaisong

fix: 测试6-2结果是完全可用的。

parent 21317895
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
......@@ -7,15 +7,21 @@
<connectionStrings>
<!--<add name="2localESDatabase" connectionString="host=127.0.0.1;port=9200;defaultIndex=test_version2;requesttimeout=30000" />-->
<add name="2localESDatabase" connectionString="host=127.0.0.1;port=9200;defaultIndex=test_version2;requesttimeout=30000" />
<add name="2localESDatabase" connectionString="host=minder;port=9200;defaultIndex=test_version6;requesttimeout=30000" />
<!--<add name="2localESDatabase" connectionString="host=minder;port=9200;defaultIndex=test_version6;requesttimeout=30000" />-->
<!--<add name="6MinderESDatabase" connectionString="host=minder;port=9200;defaultIndex=test_version6;requesttimeout=30000" />-->
<add name="6MinderESDatabase" connectionString="host=127.0.0.1;port=9200;defaultIndex=test_version2;requesttimeout=30000" />
<add name="6MinderESDatabase" connectionString="host=minder;port=9200;defaultIndex=test_version6;requesttimeout=30000" />
</connectionStrings>
......
using System;
using System;
......@@ -177,16 +177,16 @@ namespace UnitTestProject.TestES.TestES2
#endregion
#region 返回2
#region 返回3
//
// Nest2_5_8.SearchDescriptor<HTCommon.Data2_5_8.Item> builder1 = new Nest2_5_8.SearchDescriptor<HTCommon.Data2_5_8.Item>()
//.Query(q => q.MatchAll()).From(0).Size(2);
//.Query(q => q.MatchAll()).From(0).Size(3);
// Nest2_5_8.ISearchResponse<HTCommon.Data2_5_8.Item> rep1 = TestTwoES2_6.ES2_5_8.ESAccess2.SearchDetail<HTCommon.Data2_5_8.Item>(builder1);
// Nest.SearchDescriptor<HTCommon.Data6.Item> builder2 = new Nest.SearchDescriptor<HTCommon.Data6.Item>()
//.Query(q => q.MatchAll()).From(0).Size(2);
//.Query(q => q.MatchAll()).From(0).Size(3);
// Nest.ISearchResponse<HTCommon.Data6.Item> rep2 = TestTwoES2_6.ES6_1_0.ESAccess.SearchDetail<HTCommon.Data6.Item>(builder2);
......@@ -224,7 +224,7 @@ namespace UnitTestProject.TestES.TestES2
// Nest.SearchDescriptor<HTCommon.Data6.Item> builder2 = new Nest.SearchDescriptor<HTCommon.Data6.Item>()
//.Query(q => q.Bool(b => b.Must(
// m => m.MultiMatch(f=>f.Fields(t => t.Field(tf =>(tf.CrawlID))).Query("Test_Oracle_Beige_NEWS"))
// m => m.MultiMatch(f => f.Fields(t => t.Field(tf => (tf.CrawlID))).Query("Test_Oracle_Beige_NEWS"))
// )));
// Nest.ISearchResponse<HTCommon.Data6.Item> rep2 = TestTwoES2_6.ES6_1_0.ESAccess.SearchDetail<HTCommon.Data6.Item>(builder2);
......@@ -360,8 +360,8 @@ namespace UnitTestProject.TestES.TestES2
#region 时间范围
// DateTime beginTime = DateTime.Parse("2018-06-06");
// DateTime endTime = DateTime.Parse("2018-06-08");
//DateTime beginTime = DateTime.Parse("2018-06-06");
//DateTime endTime = DateTime.Parse("2018-06-08");
// Nest2_5_8.SearchDescriptor<HTCommon.Data2_5_8.Item> builder1 = new Nest2_5_8.SearchDescriptor<HTCommon.Data2_5_8.Item>()
// .Query(q => q.Bool(b => b.Must(
......@@ -425,7 +425,7 @@ namespace UnitTestProject.TestES.TestES2
//.Query(q => q.Bool(b => b.Must(
// m => m.Term(t => t.Field(tf => tf.ItemID).Value("test"))
// )))
// .Source(s => s.Includes(si => si.Fields(fd=>fd.CrawlID,fd=>fd.FetchTime)))
// .Source(s => s.Includes(si => si.Fields(fd => fd.CrawlID, fd => fd.FetchTime)))
// ;
// Nest.ISearchResponse<HTCommon.Data6.Item> rep2 = TestTwoES2_6.ES6_1_0.ESAccess.SearchDetail<HTCommon.Data6.Item>(builder2);
......@@ -479,11 +479,11 @@ namespace UnitTestProject.TestES.TestES2
//.Aggregations(agg => agg.Cardinality("distinct_crawlID", funcC => (funcC.Field(f => f.Crawler))));
// Nest2_5_8.ISearchResponse<HTCommon.Data2_5_8.Item> rep1 = TestTwoES2_6.ES2_5_8.ESAccess2.SearchDetail<HTCommon.Data2_5_8.Item>(builder1);
// Nest.SearchDescriptor<HTCommon.Data6.Item> builder2 = new Nest.SearchDescriptor<HTCommon.Data6.Item>()
//.Aggregations(agg => agg.Cardinality("distinct_crawlID", funcC => (funcC.Field(f => f.Crawler))));
// Nest.ISearchResponse<HTCommon.Data6.Item> rep2 = TestTwoES2_6.ES6_1_0.ESAccess.SearchDetail<HTCommon.Data6.Item>(builder2);
// Nest.SearchDescriptor<HTCommon.Data6.Item> builder2 = new Nest.SearchDescriptor<HTCommon.Data6.Item>()
//.Aggregations(agg => agg.Cardinality("distinct_crawlID", funcC => (funcC.Field(f => f.Crawler))));
// Nest.ISearchResponse<HTCommon.Data6.Item> rep2 = TestTwoES2_6.ES6_1_0.ESAccess.SearchDetail<HTCommon.Data6.Item>(builder2);
#endregion
......@@ -504,12 +504,17 @@ namespace UnitTestProject.TestES.TestES2
//var result = client.Delete(deletePath, s => s.Index("test_version6"));
//6-6
//6 - 6
//Nest.ElasticClient client6 = new Nest.ElasticClient(TestTwoES2_6.ES6_1_0.ESClientConfigureManager.ConnectSetting);
//Nest.DocumentPath<HTCommon.Data6.Item> deletePath6 = new Nest.DocumentPath<HTCommon.Data6.Item>("test52");
//var result6 = client6.Delete(deletePath6, s => s.Index("test_version6"));
//6 - 2
//Nest.ElasticClient client6 = new Nest.ElasticClient(TestTwoES2_6.ES6_1_0.ESClientConfigureManager.ConnectSetting);
//Nest.DocumentPath<HTCommon.Data6.Item> deletePath6 = new Nest.DocumentPath<HTCommon.Data6.Item>("test52");
//var result6 = client6.Delete(deletePath6, s => s.Index("test_version2"));
//另一种写法
......@@ -517,7 +522,7 @@ namespace UnitTestProject.TestES.TestES2
//_client.Delete(request);
#endregion
#endregion
Console.WriteLine("测试完毕");
......
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
......@@ -7,15 +7,21 @@
<connectionStrings>
<!--<add name="2localESDatabase" connectionString="host=127.0.0.1;port=9200;defaultIndex=test_version2;requesttimeout=30000" />-->
<add name="2localESDatabase" connectionString="host=127.0.0.1;port=9200;defaultIndex=test_version2;requesttimeout=30000" />
<add name="2localESDatabase" connectionString="host=minder;port=9200;defaultIndex=test_version6;requesttimeout=30000" />
<!--<add name="2localESDatabase" connectionString="host=minder;port=9200;defaultIndex=test_version6;requesttimeout=30000" />-->
<!--<add name="6MinderESDatabase" connectionString="host=minder;port=9200;defaultIndex=test_version6;requesttimeout=30000" />-->
<add name="6MinderESDatabase" connectionString="host=127.0.0.1;port=9200;defaultIndex=test_version2;requesttimeout=30000" />
<add name="6MinderESDatabase" connectionString="host=minder;port=9200;defaultIndex=test_version6;requesttimeout=30000" />
</connectionStrings>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment