The Elasticsearch Platform
EnterpriseSearch Observability Security
Kibana
Explore, Visualize, Engage
Elasticsearch
Store, Search, Analyze
Integrations
Connect, Collect, Alert
Public cloud Hybrid On-premises
In a world where endless data creates endless possibility, search helps people and organizations thrive.
Architecture of TheGallivant Web Shop
Internet
Ship
metrics
& logs
End
user
Elastic Stack
Actions
Backend
micro services
Monitoring
Cart
Catalog
Ordering
Checkout
Search
React Client DevOps
Engineer
SecOps
Engineer
Marketer
…
End
user
Public Cloud
23.
APIs
検索のない世界から App Searchがある世界へ
Great
Search
コアテクノロジー コンテンツの格納 UI/UX
検索結果の
コントロール
No
Search
Elasticsearch
Search UI
検索結果
オートコンプリート
フィルター
ファセット機能
分析
関連性チューニング
検索の再現・テスト
Dashboard
Web Crawler
Model の作成
• Elasticsearchのデータ
から JSON にシリアライズ
のため必要
• Book という名のクラスを
追加
public class Book
{
public string Title { get; set; }
public string Isbn { get; set; }
public int PageCount { get; set; }
public string ThumbnailUrl { get; set; }
public string ShortDescription { get; set; }
public string LongDescription { get; set; }
public string Status { get; set; }
public string Authors { get; set; }
public string Categories { get; set; }
}
67.
Elasticsearch への接続を作成
• NESTライブラリ追加
• Program.cs への追加
dotnet add package NEST
using Elasticsearch.Net;
using Nest;
using Elastic.Apm.NetCoreAll;
===
var pool = new SingleNodeConnectionPool
//ローカル実⾏の場合
(new Uri(“http://localhost:9200”));
var settings = new ConnectionSettings(pool)
.DefaultIndex("books");
var client = new ElasticClient(settings);
services.AddSingleton(client);
---
//Elastic APM 追加
app.UseAllElasticApm(builder.Configuration);
app.UseHttpsRedirection();
app.UseBlazorFrameworkFiles();
app.UseStaticFiles();
---
68.
Elasticsearch への接続を作成 -Elastic Cloud ⽤
•
var pool = new SingleNodeConnectionPool
(new Uri(http://localhost:9200/));
// Elastic Cloud デプロイ時に取得した値3つ (例)
https://elastic:oRHGj80iJUO6CF7WBUMiwyu1x@8009bf958
b6w5923b3c56983d4048df824.japaneast.azure.elastic-
cloud.com:9243