当前位置: 首页 > news >正文

页面紧急情况访问升级跳拿笔记无锡seo网站管理

页面紧急情况访问升级跳拿笔记,无锡seo网站管理,目前做网站最流行的程序语言,做外贸的国际网站有哪些Elasticsearch是一个基于Apache Lucene(TM)的开源搜索引擎。无论在开源还是专有领域#xff0c;Lucene可以被认为是迄今为止最先进、性能最好的、功能最全的搜索引擎库。Elasticsearch使用标准的RESTful API和JSON。我们还用多种语言构建和维护客户机#xff0c;如Java、Pyth… Elasticsearch是一个基于Apache Lucene(TM)的开源搜索引擎。无论在开源还是专有领域Lucene可以被认为是迄今为止最先进、性能最好的、功能最全的搜索引擎库。Elasticsearch使用标准的RESTful API和JSON。我们还用多种语言构建和维护客户机如Java、Python、。NET、SQL和PHP。此外我们的社区贡献了更多。它们易于使用使用起来很自然而且就像Elasticsearch一样不会限制您对它们的使用。下面看下基于Net的使用https://github.com/elastic/elasticsearch-net选择 Elasticsearch.Net 作为客户端连接var node  new Uri(http://myserver:9200); var config  new ConnectionConfiguration(node); var client  new ElasticLowLevelClient(config); var myJson  { hello : world }; client.IndexStringResponse(myindex, 1, myJson); var myJson  new { hello  world }; client.IndexBytesResponse(myindex, 1, PostData.Serializable(myJson));创建public class ElasticSearchClient{public ElasticLowLevelClient Client { get; }private readonly IConfiguration _configuration;public ElasticSearchClient(IConfiguration configuration){_configuration  configuration;Client  InitClient();}#region Methodspublic async Taskstring Index(string index, string id, PostData body){var response  await Client.IndexAsyncStringResponse(index, id, body);ResponseValidate(response);return response.Body;}查询public async TaskListstring SearchWithHighLight(string index, string query){var response  await Client.SearchAsyncStringResponse(index,PostData.Serializable(new{from  0,size  100,query  new{match  new{content  query}},highlight  new{pre_tags  new[] { tag1, tag2 },post_tags  new[] { /tag1, /tag2 },fields  new{content  new { }}}}));ResponseValidate(response);var responseJson  (JObject)JsonConvert.DeserializeObject(response.Body);var hits  responseJson[hits][hits] as JArray;var result  new Liststring();foreach (var hit in hits){var id  hit[_id].ToObjectstring();result.Add(id);}return result;}删除public async Taskbool Delete(string index, string id){var response  await Client.DeleteAsyncStringResponse(index, id);ResponseValidate(response);return response.Success;}#endregion#region privatesprivate ElasticLowLevelClient InitClient(){var node  new Uri(_configuration.GetConnectionString(ElasticSearch));var settings  new ConnectionConfiguration(node);var client  new ElasticLowLevelClient(settings);return client;}private void ResponseValidate(StringResponse response){if (response.Success  false){throw new ResultException(response.Body);}}#endregion}使用private readonly ElasticSearchClient _elasticSearchClient; await _elasticSearchClient.Index(Article.EsIndex, article.ArticleUID,PostData.Serializable(article));
http://www.yutouwan.com/news/428555/

相关文章:

  • 平面设计鉴赏网站衡州网站建设seo
  • 建设行政管理部门网站游戏推广员招聘
  • 织梦网站程序模板下载网推渠道平台
  • 网站为什么要备案莆田网站建设哪里便宜
  • 推进门户网站建设方案wordpress 开启多用户
  • 郸城网站建设wordpress教育平台
  • 做字素的网站wordpress 注册很慢
  • 网站建设与制作dw8教程录音录像手表网站
  • 杭州网站排名优化公司邢台百度推广
  • 网站网站建设教程灯饰如何做网站推广
  • 网站文章可以做外链吗莱芜网站优化有哪些
  • 开发网站 语言重庆 建网站
  • 做网站和做游戏哪个难连云港网站关键字优化
  • 国外产品网站做网站导航用什么开元程序
  • 营销型网站易网拓织梦做分销网站
  • 做网站映射tcp营销网站排行
  • 荣县住房和城乡建设厅网站宝应宝楠国际学校
  • 网站设计常用软件都有哪些wordpress卡密激活码自动发放
  • 网站开发 会员模块滨州网站建设hskj360
  • 网站关键词用热门的还是冷门网络公司排名及利润
  • 代码网站开发wordpress 水煮鱼小程序
  • php和mysql做租车网站做爰全过程免费费网站
  • 麦德龙网站建设目标去马来西亚做网站网站
  • 具有口碑的柳州网站建设哪家好wordpress文件缺失
  • 沈阳手机端建站模板ftp怎么上传网站
  • 中国建设銀行网站投诉电话销售的技巧与口才
  • 柳林网站建设我要恢复百度
  • auxer可以做网站嘛开发免费app
  • 打开网页出现网站建设中人和兽做的网站视频
  • 做产品展示网站外网专线