Commit 7ddfb70a by mahaisong

fix: ES导入功能完毕

parent 4fe74380
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
......@@ -81,7 +81,7 @@
<!--<oracle.manageddataaccess.client>
<version number="*">
<dataSources>
<dataSource alias="BEIGE_ORCLDB" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=140.207.41.22)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) " />
<dataSource alias="BEIGE_ORCL" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=140.207.41.22)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) " />
</dataSources>
</version>
</oracle.manageddataaccess.client>-->
......
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
......@@ -81,7 +81,7 @@
<!--<oracle.manageddataaccess.client>
<version number="*">
<dataSources>
<dataSource alias="BEIGE_ORCLDB" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=140.207.41.22)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) " />
<dataSource alias="BEIGE_ORCL" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=140.207.41.22)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) " />
</dataSources>
</version>
</oracle.manageddataaccess.client>-->
......
using ESCommon.Data;

using ESCommon.Data;

using HooLab.Log;
using HTCommon.Data;
using Nest;
using System;
......@@ -11,12 +12,12 @@ using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace ESCommon
namespace MinderESCommon
{
/// <summary>
/// 直接获取ESData的特殊类
/// </summary>
public class ESItemAccess : ESAccess
public class MinderESItemAccess : MinderESAccess
{
public const string NullValue = "空空";
......@@ -151,7 +152,7 @@ namespace ESCommon
}
}
public class ESAccess
public class MinderESAccess
{
/// <summary>
/// 从ES中搜索数据,仅返回需要的数据本体
......@@ -170,7 +171,7 @@ namespace ESCommon
public static void BulkInsert<T>(T[] array) where T : class
{
ElasticClient client = new ElasticClient(ESClientConfigureManager.ConnectSetting);
ElasticClient client = new ElasticClient(MinderESClientConfigureManager.ConnectSetting);
IBulkResponse result = null;
......@@ -219,7 +220,7 @@ namespace ESCommon
{
return null;
}
ElasticClient client = new ElasticClient(ESClientConfigureManager.ConnectSetting);
ElasticClient client = new ElasticClient(MinderESClientConfigureManager.ConnectSetting);
IIndexResponse result = null;
try
......@@ -309,7 +310,7 @@ namespace ESCommon
public static bool Delete<T>(DeleteByQueryRequest<T> deleteQuery) where T : class
{
ElasticClient client = new ElasticClient(ESClientConfigureManager.ConnectSetting);
ElasticClient client = new ElasticClient(MinderESClientConfigureManager.ConnectSetting);
var result = client.DeleteByQuery(deleteQuery);
if (result == null || result.ServerError != null)
......@@ -334,7 +335,7 @@ namespace ESCommon
}
private static readonly object _syncObj = new object();
static ESAccess()
static MinderESAccess()
{
}
......@@ -360,18 +361,18 @@ namespace ESCommon
private static int Count<T>(string jsonQuery) where T : class
{
ElasticClient client = new ElasticClient(ESClientConfigureManager.ConnectSetting);
ElasticClient client = new ElasticClient(MinderESClientConfigureManager.ConnectSetting);
var response = client.Search<T>(Deserialize<SearchDescriptor<T>>(jsonQuery));
return Convert.ToInt32(response.Total);
}
public static void ReverseNullValueForQuery(Item item)
{
if (item.MediaID == ESItemAccess.NullValue)
if (item.MediaID == MinderESItemAccess.NullValue)
{
item.MediaID = null;
}
if (item.DuplicationID == ESItemAccess.NullValue)
if (item.DuplicationID == MinderESItemAccess.NullValue)
{
item.DuplicationID = null;
}
......@@ -381,7 +382,7 @@ namespace ESCommon
{
if (itemAnalyzeData.Region != null)
{
var isContainNull = itemAnalyzeData.Region.Any(model => model == ESItemAccess.NullValue);
var isContainNull = itemAnalyzeData.Region.Any(model => model == MinderESItemAccess.NullValue);
if (isContainNull)
{
itemAnalyzeData.Region = null;
......@@ -389,7 +390,7 @@ namespace ESCommon
}
if (itemAnalyzeData.TopicIDs != null)
{
var isContainNull = itemAnalyzeData.TopicIDs.Any(model => model == ESItemAccess.NullValue);
var isContainNull = itemAnalyzeData.TopicIDs.Any(model => model == MinderESItemAccess.NullValue);
if (isContainNull)
{
itemAnalyzeData.TopicIDs = null;
......@@ -403,11 +404,11 @@ namespace ESCommon
{
if (String.IsNullOrEmpty(item.MediaID))
{
item.MediaID = ESItemAccess.NullValue;
item.MediaID = MinderESItemAccess.NullValue;
}
if (String.IsNullOrEmpty(item.DuplicationID))
{
item.DuplicationID = ESItemAccess.NullValue;
item.DuplicationID = MinderESItemAccess.NullValue;
}
if (item.AnalyzeData != null)
{
......@@ -415,16 +416,16 @@ namespace ESCommon
{
if (itemAnalyzeData.Region == null)
{
itemAnalyzeData.Region = new string[] { ESItemAccess.NullValue };
itemAnalyzeData.Region = new string[] { MinderESItemAccess.NullValue };
}
if (itemAnalyzeData.TopicIDs == null)
{
itemAnalyzeData.TopicIDs = new string[] { ESItemAccess.NullValue };
}
if (String.IsNullOrEmpty(itemAnalyzeData.DuplicationID))
{
itemAnalyzeData.DuplicationID = ESItemAccess.NullValue;
itemAnalyzeData.TopicIDs = new string[] { MinderESItemAccess.NullValue };
}
//if (String.IsNullOrEmpty(itemAnalyzeData.DuplicationID))
//{
// itemAnalyzeData.DuplicationID = MinderESItemAccess.NullValue;
//}
}
}
}
......@@ -437,7 +438,7 @@ namespace ESCommon
/// <returns>统计数据结果集</returns>
public static ISearchResponse<T> SearchDetail<T>(SearchDescriptor<T> searchQuery) where T : class
{
ElasticClient client = new ElasticClient(ESClientConfigureManager.ConnectSetting);
ElasticClient client = new ElasticClient(MinderESClientConfigureManager.ConnectSetting);
ISearchResponse<T> response = null;
try
{
......@@ -472,7 +473,7 @@ namespace ESCommon
/// <returns>统计数据结果集</returns>
private static ISearchResponse<T> SearchDetail<T>(string searchQuery) where T : class
{
ElasticClient client = new ElasticClient(ESClientConfigureManager.ConnectSetting);
ElasticClient client = new ElasticClient(MinderESClientConfigureManager.ConnectSetting);
ISearchResponse<T> response = null;
try
{
......@@ -537,7 +538,7 @@ namespace ESCommon
{
try
{
ElasticClient client = new ElasticClient(ESClientConfigureManager.ConnectSetting);
ElasticClient client = new ElasticClient(MinderESClientConfigureManager.ConnectSetting);
using (MemoryStream stream = new MemoryStream())
{
client.Serializer.Serialize(obj, stream);
......@@ -552,7 +553,7 @@ namespace ESCommon
public static T Deserialize<T>(string json) where T : class
{
ElasticClient client = new ElasticClient(ESClientConfigureManager.ConnectSetting);
ElasticClient client = new ElasticClient(MinderESClientConfigureManager.ConnectSetting);
return client.Serializer.Deserialize<T>(new MemoryStream(Encoding.UTF8.GetBytes(json)));
}
}
......
using Elasticsearch.Net;
using Elasticsearch.Net;
......@@ -5,9 +5,9 @@ using System.Collections.Generic;
using System.Configuration;
using System.Text.RegularExpressions;
namespace ESCommon
namespace MinderESCommon
{
public sealed class ESClientConfigureManager
public sealed class MinderESClientConfigureManager
{
public static List<Uri> Uris { get; private set; }
......@@ -18,13 +18,13 @@ namespace ESCommon
/// </summary>
public static ConnectionSettings ConnectSetting { get; private set; }
private const String ConnectionStringIndex = "ESDatabase";
private const String ConnectionStringIndex = "MinderESDatabase";
private const String HostIndex = "host";
private const String PortIndex = "port";
private const String DefaultIndexIndex = "defaultIndex";
static ESClientConfigureManager()
static MinderESClientConfigureManager()
{
String connectionString = ConfigurationManager.ConnectionStrings[ConnectionStringIndex].ConnectionString;
String[] namedValues = connectionString.Split(';');
......@@ -35,8 +35,8 @@ namespace ESCommon
nvPair[pair[0]] = pair[1];
}
String _url = GetValueByName(nvPair, HostIndex, "tank.palaspom.com|mech.palaspom.com");
String _port = GetValueByName(nvPair, PortIndex, "19235");
String _url = GetValueByName(nvPair, HostIndex, "minder");
String _port = GetValueByName(nvPair, PortIndex, "9200");
//支持多Uri模式,要求多个链接使用 | 分隔,在分隔后数量相同的情况下按照顺序一一对应,如果其中一方仅有一个则使用它对应对方所有部分
string[] urls = _url.Split('|');
......@@ -78,10 +78,11 @@ namespace ESCommon
var pool = new StaticConnectionPool(Uris);
String index = GetValueByName(nvPair, DefaultIndexIndex, "palas");
String index = GetValueByName(nvPair, DefaultIndexIndex, "palas_test");
DefaultIndex = index;
//ConnectSetting = new ConnectionSettings(pool).BasicAuthentication("carey", "jfyhdcm").DefaultIndex(index).DisableDirectStreaming();
ConnectSetting = new ConnectionSettings(pool).BasicAuthentication("carey", "jfyhdcm").DefaultIndex(index).DisableDirectStreaming();
ConnectSetting = new ConnectionSettings(pool).DefaultIndex(index).DisableDirectStreaming();
}
private static String GetValueByName(Dictionary<String, String> nvPair, String name, String defaultValue)
......
using System;
++ /dev/null
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ESCommon.DataAccess
{
/// <summary>
/// 从ES中获取数据 的统计信息
/// </summary>
public class ESCountAccess
{
///// <summary>
///// 统计数据
///// </summary>
///// <param name="ObjectType">对象类别:Subject Crawl Issue Caregory</param>
///// <param name="ObjectID">对象ID</param>
///// <param name="IssueID">IssueID</param>
///// <returns></returns>
//public static ItemCount[] GetCountInfo(string ObjectType, string ObjectID, string IssueID,Item[] Items)
//{
// List<ItemCount> Count = new List<ItemCount>();
// if (Items.Length == 0) return Count.ToArray() ;
// //如PubDate不存在,用FetchTime赋值
// DateTime? StartDate, EndDate;
// StartDate = Items.Min(model => model.PubDate);
// EndDate = Items.Max(model => model.PubDate);
// if (StartDate == null)
// StartDate = Items.Where(model => model.PubDate == null).Min(model => model.FetchTime);
// if (EndDate == null)
// EndDate = Items.Where(model => model.PubDate == null).Max(model => model.FetchTime);
// int DateSpan = ((DateTime)EndDate).Subtract((DateTime)StartDate).Days;
// for (int i = 0; i <= DateSpan; i++)
// {
// //取出每天的Item
// List<Item> DateItems = Items.Where(model => model.PubDate == null && model.FetchTime == ((DateTime)StartDate).AddDays(i).Date).ToList();
// DateItems.AddRange(Items.Where(model => model.PubDate != null).Where(model => model.PubDate == ((DateTime)StartDate).AddDays(i).Date).ToList());
// #region 取出每天的媒体
// var Medias = from model in Items
// group model by new { model.MediaID, model.MediaName, model.MediaType, model.MediaOrganType, model.MediaRegionType, model.MediaIndustryIDs } into g
// select new
// {
// g.Key,
// InfoCount = g.Count(),
// AlertCount = g.Where(a => a.ManageData != null).Count(a => a.ManageData.Count(b => b.IssueID == IssueID && b.AlertLevel > 0) > 0),
// MarkCount = g.Where(a => a.ManageData != null).Count(a => a.ManageData.Count(b => b.IssueID == IssueID && b.Mark > 0) > 0),
// BadCount = g.Where(a => a.AnalyzeData != null).Count(a => a.AnalyzeData.Count(b => b.IssueID == IssueID && b.Sentiment == -1) > 0),
// GoodCount = g.Where(a => a.AnalyzeData != null).Count(a => a.AnalyzeData.Count(b => b.IssueID == IssueID && b.Sentiment == 1) > 0),
// ViewCount = g.Where(a => a.CurrentCount != null).Sum(a => a.CurrentCount.ViewCount < 0 ? 0 : a.CurrentCount.ViewCount),
// ReplyCount = g.Where(a => a.CurrentCount != null).Sum(a => a.CurrentCount.ReplyCount < 0 ? 0 : a.CurrentCount.ReplyCount),
// ForwardCount = g.Where(a => a.CurrentCount != null).Sum(a => a.CurrentCount.ForwardCount < 0 ? 0 : a.CurrentCount.ForwardCount)
// };
// #endregion
// ItemCount DateCount = new ItemCount();
// #region 基础信息
// DateCount.ObjectType = ObjectType;
// DateCount.ObjectID = ObjectID;
// DateCount.IssueID = IssueID;
// DateCount.PubDate = ((DateTime)StartDate).AddDays(i);
// #endregion
// #region 主表统计信息
// //媒体数
// DateCount.MediaCount = Medias.Count();
// //信息总数
// DateCount.InfoCount = Items.Count();
// //预警数
// DateCount.AlertCount = Medias.Sum(model => model.AlertCount);
// //重点标记
// DateCount.MarkCount = Medias.Sum(model => model.MarkCount);
// //负面
// DateCount.BadCount = Medias.Sum(model => model.BadCount);
// //正面
// DateCount.GoodCount = Medias.Sum(model => model.GoodCount);
// //点击
// DateCount.ViewCount = Medias.Sum(model => model.ViewCount);
// //回复
// DateCount.ReplyCount = Medias.Sum(model => model.ReplyCount);
// //转发
// DateCount.ForwardCount = Medias.Sum(model => model.ForwardCount);
// #endregion
// if (Medias.Count() == 0)
// continue;
// List<MediaAnalyzeCount> MediaAnalyzeCount = new List<Data.MediaAnalyzeCount>();
// #region 媒体表统计信息
// foreach (var media in Medias)
// {
// MediaAnalyzeCount.Add(new MediaAnalyzeCount()
// {
// MediaID = media.Key.MediaID,
// MediaName = media.Key.MediaName,
// MediaType = media.Key.MediaType,
// MediaRegionType = media.Key.MediaRegionType,
// MediaOrganType = media.Key.MediaOrganType,
// MediaIndustryID = media.Key.MediaIndustryIDs,
// InfoCount = media.InfoCount,
// AlertCount = media.AlertCount,
// MarkCount = media.MarkCount,
// BadCount = media.BadCount,
// GoodCount = media.GoodCount,
// ViewCount = media.ViewCount,
// ReplyCount = media.ReplyCount,
// ForwardCount = media.ForwardCount
// });
// }
// DateCount.MediaAnalyzeCount = MediaAnalyzeCount.ToArray();
// #endregion
// Count.Add(DateCount);
// }
// return Count.ToArray();
//}
}
}
\ No newline at end of file
using System;
using System;
......@@ -2,7 +2,7 @@
using System.Security.Cryptography;
using System.Text;
namespace ESCommon
namespace MinderESCommon
{
public class MD5Helper
{
......
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
......@@ -7,10 +7,11 @@
<ProjectGuid>{B911AAD3-B7B0-4A0A-BAE6-3EAC5DF762C7}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ESCommon</RootNamespace>
<AssemblyName>ESCommon</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<RootNamespace>MinderESCommon</RootNamespace>
<AssemblyName>MinderESCommon</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
......@@ -60,11 +61,8 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Data\Item.cs" />
<Compile Include="Data\Enums.cs" />
<Compile Include="ESAccess.cs" />
<Compile Include="ESClientConfigureManager.cs" />
<Compile Include="ESCountAccess.cs" />
<Compile Include="MD5Helper.cs" />
<Compile Include="PerformanceUtility.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
......@@ -72,6 +70,12 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\HTCommon\HTCommon.csproj">
<Project>{e497051e-61e1-4247-93d3-7929a8c8b7f6}</Project>
<Name>HTCommon</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
......
using System;
using System;
......@@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ESCommon
namespace MinderESCommon
{
public class PerformanceUtility
{
......
using System.Reflection;
using System.Reflection;
......@@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("ESCommon")]
[assembly: AssemblyTitle("MinderESCommon")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ESCommon")]
[assembly: AssemblyProduct("MinderESCommon")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\MinderESCommon.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\MinderESCommon.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\MinderESCommon.pdb
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\Elasticsearch.Net.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\HooLab.Log.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\MongoDB.Bson.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\Nest.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\Newtonsoft.Json.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\HooLab.Config.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\HooLab.Runtime.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\Elasticsearch.Net.xml
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\MongoDB.Bson.xml
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\Nest.xml
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\Newtonsoft.Json.xml
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\obj\Debug\MinderESCommon.csprojResolveAssemblyReference.cache
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\obj\Debug\MinderESCommon.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\obj\Debug\MinderESCommon.pdb
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\HTCommon.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\pdfbox-app-2.0.7.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\IKVM.OpenJDK.Core.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\NPOI.OOXML.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\NPOI.ScratchPad.HWPF.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\HtmlAgilityPack.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\ServiceStack.Interfaces.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\ServiceStack.Redis.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\Z.EntityFramework.Plus.EF6.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\hanlp-1.3.1.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\IKVM.Runtime.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\IKVM.OpenJDK.Util.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\IKVM.OpenJDK.Text.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\IKVM.OpenJDK.SwingAWT.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\IKVM.OpenJDK.Media.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\IKVM.OpenJDK.XML.API.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\IKVM.OpenJDK.Security.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\IKVM.OpenJDK.Naming.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\IKVM.OpenJDK.Beans.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\IKVM.OpenJDK.Jdbc.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\NPOI.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\NPOI.OpenXmlFormats.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\NPOI.OpenXml4Net.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\ICSharpCode.SharpZipLib.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\ServiceStack.Common.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\ServiceStack.Text.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\EntityFramework.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\IKVM.Runtime.JNI.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\IKVM.OpenJDK.Management.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\IKVM.AWT.WinForms.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\IKVM.OpenJDK.Charsets.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\IKVM.OpenJDK.Corba.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\IKVM.OpenJDK.Remoting.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\HTCommon.pdb
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\HtmlAgilityPack.pdb
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\HtmlAgilityPack.xml
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\NPOI.xml
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\ServiceStack.Common.xml
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\ServiceStack.Text.xml
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\EntityFramework.xml
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\ESCommon\bin\Debug\zh-Hans\EntityFramework.resources.dll
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Elasticsearch.Net" version="2.5.8" targetFramework="net45" />
<package id="Elasticsearch.Net" version="2.5.8" targetFramework="net45" requireReinstallation="true" />
<package id="MongoDB.Bson" version="2.5.0" targetFramework="net45" />
<package id="NEST" version="2.5.8" targetFramework="net45" />
<package id="NEST" version="2.5.8" targetFramework="net45" requireReinstallation="true" />
<package id="Newtonsoft.Json" version="11.0.1" targetFramework="net45" />
</packages>
\ No newline at end of file
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\HJBeigeModel\bin\Debug\HJBeigeModel.dll.config
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\HJBeigeModel\bin\Debug\HJBeigeModel.dll.config
......@@ -11,5 +11,6 @@ D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\HJBeigeMo
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\HJBeigeModel\bin\Debug\Newtonsoft.Json.xml
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\HJBeigeModel\bin\Debug\zh-Hans\EntityFramework.resources.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\HJBeigeModel\bin\Debug\zh-Hans\EntityFramework.SqlServer.resources.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\HJBeigeModel\obj\Debug\HJBeigeModel.csprojResolveAssemblyReference.cache
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\HJBeigeModel\obj\Debug\HJBeigeModel.dll
D:\smallproject\10.Paul需求-JSON贝格ES导入本地ES\ImportLocalES\HJBeigeModel\obj\Debug\HJBeigeModel.pdb


......@@ -15,7 +15,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HJBeigeModel", "HJBeigeMode
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BeigeOracle", "BeigeOracle", "{4D996BBA-26B5-4102-BBA4-75765558181A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ESCommon", "ESCommon\ESCommon.csproj", "{B911AAD3-B7B0-4A0A-BAE6-3EAC5DF762C7}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinderESCommon", "ESCommon\MinderESCommon.csproj", "{B911AAD3-B7B0-4A0A-BAE6-3EAC5DF762C7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CleanES", "CleanES\CleanES.csproj", "{3E017861-9AAA-4163-9780-A6D34DACB3E6}"
EndProject
......@@ -99,6 +99,7 @@ Global
{F770A88D-59AB-4A0C-8585-CD0FB5568EC2} = {4D996BBA-26B5-4102-BBA4-75765558181A}
{E497051E-61E1-4247-93D3-7929A8C8B7F6} = {872DBB32-6B09-4E38-B4F5-D0B68B61F036}
{0AFE2959-EB8E-4D60-B1B1-AB7616EA319D} = {872DBB32-6B09-4E38-B4F5-D0B68B61F036}
{B911AAD3-B7B0-4A0A-BAE6-3EAC5DF762C7} = {872DBB32-6B09-4E38-B4F5-D0B68B61F036}
{D9B7EDD7-C997-4507-BEAA-5E3A424947AF} = {76D88CD4-AF4C-4798-B14D-2E378517B2BB}
EndGlobalSection
EndGlobal
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
</startup>
<appSettings>
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
<add key="log4net.Config" value="Configs\log4net.config" />
<add key="log4net.Config.Watch" value="True" />
<add key="OAuth.Authority" value="https://identity.palaspom.com/id" />
<add key="DAAS.WebAPI" value="https://daas.palaspom.com/" />
<!--<add key="Redis.Host.Crawler" value="mech.palaspom.com" />
<add key="Redis.Port.Crawler" value="11377" />
<add key="Server.Notify.Users" value="Carey" />
-->
<!--取转载数Redis数据库地址-->
<!--
<add key="Redis.Host.ItemDup" value="pubtopic.org" />
<add key="Redis.Port.ItemDup" value="11370" />
-->
<!--阅读器Redis库(本地库)-->
<!--
<add key="Redis.Host.Reader" value="mech.palaspom.com" />
<add key="Redis.Port.Reader" value="11389" />
-->
<!--mysql实体 API地址-->
<!--
<add key="MysqlApiUrl" value="http://internal.palaspom.com/Entity/" />
<add key="APPModel" value="0" />
<add key="Analyzer.Core.KeywordExtracter.RemainPos" value="n" />
<add key="IssueID" value="HuaJin" />-->
</appSettings>
<connectionStrings>
<!--全部改成minder本地配置-->
<!--Minder本地ES-->
<add name="MinderESDatabase" connectionString="host=minder;port=9200;defaultIndex=palas_test;requesttimeout=30000" />
<!--来源ES、 态格生产环境ES-->
<add name="ESDatabase" connectionString="host=mech.palaspom.com|tank.palaspom.com;port=19235;defaultIndex=palas" />
<add name="PalasV5Context" connectionString="server=minder;user id=palas;password=lapas;persistsecurityinfo=True;database=Palas_V5;Character Set=utf8" providerName="MySql.Data.MySqlClient" />
<add name="PalasEntityContext" connectionString="server=minder;user id=palas;password=lapas;persistsecurityinfo=True;database=Palas_V5;Character Set=utf8" providerName="MySql.Data.MySqlClient" />
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.12.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.9.12.0" newVersion="6.9.12.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.12.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>
</configuration>
\ No newline at end of file
namespace TaikorES_ImportLocalES
namespace TaikorES_ImportLocalES
......@@ -36,13 +36,18 @@
this.label3 = new System.Windows.Forms.Label();
this.textBox_END = new System.Windows.Forms.TextBox();
this.listBox1 = new System.Windows.Forms.ListBox();
this.button_next = new System.Windows.Forms.Button();
this.label4 = new System.Windows.Forms.Label();
this.textBox_Count = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(209, 132);
this.button1.Location = new System.Drawing.Point(224, 155);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.Size = new System.Drawing.Size(161, 35);
this.button1.TabIndex = 0;
this.button1.Text = "开始执行";
this.button1.UseVisualStyleBackColor = true;
......@@ -50,16 +55,16 @@
//
// textBox_DT
//
this.textBox_DT.Location = new System.Drawing.Point(273, 55);
this.textBox_DT.Location = new System.Drawing.Point(224, 55);
this.textBox_DT.Name = "textBox_DT";
this.textBox_DT.Size = new System.Drawing.Size(197, 20);
this.textBox_DT.Size = new System.Drawing.Size(161, 20);
this.textBox_DT.TabIndex = 1;
this.textBox_DT.Text = "2012-01-01";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(32, 58);
this.label1.Location = new System.Drawing.Point(7, 58);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(217, 13);
this.label1.TabIndex = 2;
......@@ -68,17 +73,17 @@
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("微软雅黑", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(231, 9);
this.label2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(232, 9);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(314, 28);
this.label2.Size = new System.Drawing.Size(375, 27);
this.label2.TabIndex = 3;
this.label2.Text = "Taikor的ES数据一次性导入程序";
this.label2.Text = "态格生产环境“ES数据”一次性导入程序";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(32, 87);
this.label3.Location = new System.Drawing.Point(7, 94);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(217, 13);
this.label3.TabIndex = 4;
......@@ -86,29 +91,78 @@
//
// textBox_END
//
this.textBox_END.Location = new System.Drawing.Point(273, 87);
this.textBox_END.Location = new System.Drawing.Point(224, 91);
this.textBox_END.Name = "textBox_END";
this.textBox_END.Size = new System.Drawing.Size(197, 20);
this.textBox_END.Size = new System.Drawing.Size(161, 20);
this.textBox_END.TabIndex = 5;
this.textBox_END.Text = "2018-05-24";
//
// listBox1
//
this.listBox1.FormattingEnabled = true;
this.listBox1.Location = new System.Drawing.Point(35, 191);
this.listBox1.Location = new System.Drawing.Point(35, 217);
this.listBox1.Name = "listBox1";
this.listBox1.ScrollAlwaysVisible = true;
this.listBox1.Size = new System.Drawing.Size(457, 264);
this.listBox1.Size = new System.Drawing.Size(564, 238);
this.listBox1.TabIndex = 6;
this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged);
//
// button_next
//
this.button_next.Location = new System.Drawing.Point(400, 46);
this.button_next.Name = "button_next";
this.button_next.Size = new System.Drawing.Size(175, 36);
this.button_next.TabIndex = 7;
this.button_next.Text = "接着上次";
this.button_next.UseVisualStyleBackColor = true;
this.button_next.Click += new System.EventHandler(this.button_next_Click);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(35, 462);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(471, 13);
this.label4.TabIndex = 8;
this.label4.Text = "注意:此程序,只允许执行1个客户端。不允许多个同时操作。将导致数据重复插入ES。";
//
// textBox_Count
//
this.textBox_Count.Location = new System.Drawing.Point(224, 129);
this.textBox_Count.Name = "textBox_Count";
this.textBox_Count.Size = new System.Drawing.Size(100, 20);
this.textBox_Count.TabIndex = 9;
this.textBox_Count.Text = "500";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(7, 132);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(129, 13);
this.label5.TabIndex = 10;
this.label5.Text = "查询ES一次最大多少条";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(35, 191);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(0, 13);
this.label6.TabIndex = 11;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.ClientSize = new System.Drawing.Size(547, 470);
this.ClientSize = new System.Drawing.Size(630, 481);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.textBox_Count);
this.Controls.Add(this.label4);
this.Controls.Add(this.button_next);
this.Controls.Add(this.listBox1);
this.Controls.Add(this.textBox_END);
this.Controls.Add(this.label3);
......@@ -132,6 +186,11 @@
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox textBox_END;
private System.Windows.Forms.ListBox listBox1;
private System.Windows.Forms.Button button_next;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox textBox_Count;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
}
}
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
......@@ -37,6 +37,14 @@
<HintPath>..\packages\Elasticsearch.Net.2.5.8\lib\net46\Elasticsearch.Net.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="hanlp-1.3.1">
<HintPath>..\include\HanLP\hanlp-1.3.1.dll</HintPath>
</Reference>
......@@ -64,6 +72,14 @@
<Reference Include="ICSharpCode.SharpZipLib">
<HintPath>..\include\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference>
<Reference Include="MySql.Data, Version=6.9.12.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<HintPath>..\packages\MySql.Data.6.9.12\lib\net45\MySql.Data.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MySql.Data.Entity.EF6, Version=6.9.12.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<HintPath>..\packages\MySql.Data.Entity.6.9.12\lib\net45\MySql.Data.Entity.EF6.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Nest, Version=2.0.0.0, Culture=neutral, PublicKeyToken=96c599bbe3e70f5d, processorArchitecture=MSIL">
<HintPath>..\packages\NEST.2.5.8\lib\net46\Nest.dll</HintPath>
<Private>True</Private>
......@@ -79,6 +95,7 @@
<HintPath>..\include\PalasEntityModel.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
......@@ -130,6 +147,10 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ESCommon\MinderESCommon.csproj">
<Project>{b911aad3-b7b0-4a0a-bae6-3eac5df762c7}</Project>
<Name>MinderESCommon</Name>
</ProjectReference>
<ProjectReference Include="..\HJBeigeModel\HJBeigeModel.csproj">
<Project>{0afe2959-eb8e-4d60-b1b1-ab7616ea319d}</Project>
<Name>HJBeigeModel</Name>
......
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