こんにちは、CADDi AI Lab MLEの志水です.8/19に10X,M3の両社と検索運用勉強会[#Search_C10Xm3]を開催いたしました.
AI Labでは図面管理SaaS CADDi DRAWERの検索サービスを開発/運用してきており、その経験から
OpenSearchで実現する画像検索とテスト追加で目指す安定運用についてお話ししました.
図面にまつわる pain Copyright 2017-2022 CADDi Inc. All rights reserved. 5 業務都合上「似た」図面を作る機会が多く(勝手違いや寸法違いなど)見た目で 類似が検索できることに価 値がある.業務や会社を跨ぐ際に pdf 化されることが多く、pdf で 実現が必要. 寸法違い 例
検索システム 全体アーキテクチャ Copyright 2017-2022 CADDi Inc. All rights reserved. 8 クエリ、モデル、検索エンジンをAI Labが開発/運用している. DRAWERチーム: サービス全体(灰色) AI Lab: Kaleido (水色) が責任分界点
OpenSearchと ● https://www.elastic.co/blog/why-license-change-aws ○ o why the change? AW and Amazon Elasticsearch ervice. hey have been doing things that we think are just NO OK since 2015 and it has only gotten worse. If we don’t stand up to them now, as a successful company and leader in the market, who will? ● https://aws.amazon.com/Open earch-service/the-elk-stack/what-is-Open earch/ ○ On January 21, 2021, Elastic NV announced that they would change their software licensing strategy and not release new versions of Elasticsearch and Kibana under the permissive Apache License, Version 2.0 (ALv2). ● https://aws.amazon.com/blogs/opensource/stepping-up-for-a-truly-open-source-elasticsearch/ ○ Choosing to fork a project is not a decision to be taken lightly, but it can be the right path forward when the needs of a community diverge—as they have here. ● https://www.elastic.co/blog/elastic-and-amazon-reach-agreement-on-trademark-infringement-lawsuit ○ We’re pleased to share that Elastic and Amazon have resolved the trademark infringement lawsuit related to the term Elasticsearch. Copyright 2017-2022 CADDi Inc. All rights reserved. 9 元々あった が Elasticsearch. それを AWS managed として提供していた.Elastic が怒って license を変えた. aws 怒って fork (OpenSearch) を作った.(そ 後仲直りした but the damage is done) docs 綺麗ですが如何せんElasticsearch に比べて歴史が浅い で、ちょっとしたエラーメッセージでググると何にも出てきませ ん. そ 場合 `s/OpenSearch/Elasticsearch/g` して検索するとちゃんとヒットします.そしてそ コピペで大体動きます.
テスト追加で目指す安定運用: unit test function ごとにテストをする が unit test. - code coverage 100% 近い - 一番難しいコードってどこ? - クエリプロセッサ(pre/post) クラスを作成 - Deep推論部分 型付けを厳密にして安全性を担保 - endpoint api client を mock Copyright 2017-2022 CADDi Inc. All rights reserved. 16
integration test Copyright 2017-2022 CADDi Inc. All rights reserved. 17 検索システム全体 整合性を担保する が integrationt test. テストによりサービス IOを明確化 - Drawer サービスに繋げるに際して、検索エンジン部分 動作 contract をしたかった - unit test だけで カバーしきれない部分 - index 作成、mock データ作成、データ 挿入と検索まで - meta データ み→deep 特徴→発注実績と複雑化に伴いテストも追加
integration test: pruning power で消すことも大事 - 増えすぎたり、integration test 内 依存が発生したりする - pruning したり、restructure する努力 必要 Copyright 2017-2022 CADDi Inc. All rights reserved. 20 差分がでかくなりがちですが必要で す...!