Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
searchnos について
Search
Yoji Shidara
March 10, 2023
Technology
490
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
searchnos について
Yoji Shidara
March 10, 2023
More Decks by Yoji Shidara
See All by Yoji Shidara
Searchnos & Search on Nostr
dara
0
380
nostrbuzzsのしくみ
dara
0
650
How nostrbuzzs works
dara
0
180
About searchnos
dara
0
180
HOME, GOPATH and me
dara
3
1.7k
The First Step for Building Groonga Bindings with Golang
dara
6
1.5k
まほうのひととき - The Magic Hour
dara
7
1k
JDK CHRONICLE
dara
2
8.9k
Timelapse Introduction
dara
1
710
Other Decks in Technology
See All in Technology
DevelopersIO 2026 Tokyo 現時点の衛星通信サービスの現状を整理してみる
maroon1st
0
310
日本AIベンチャーレポート2026
kentarofujii
0
240
Devin プロモコードの受け取りと適用(2026.10.27)
kinopeee
0
510
クラウドサインを止めずに Nuxt へ 次の10年のために先に決めたこと
bengo4com
1
160
生成AI時代、PMは事業責任者に進化するともっと面白い〜PMだからこそ事業構造を動かせる時代に〜
kakehashi
PRO
0
870
局所最適は悪ではない。壊れているのは指標です。量と質を同時に見る先行指標の設計
recruitengineers
PRO
2
1.2k
AI時代の開発はウォーターフォールに回帰する? / development-with-ai-back-to-wf
okamototakuyasr2
0
120
トークン化預金DCJPYの取り組みと活用ユースケース
finengine
0
250
AWS Continuum for Penetration Testing に Deep Dive してみる
asanoharuki
1
1.4k
推論基盤と Scale-Up Interconnect の現状と制約から俯瞰する技術動向
markunet
2
220
Codex を使った障害対応机上演習の実際
orgachem
PRO
0
360
freeeにおけるSoftware Factory
freee
PRO
0
530
Featured
See All Featured
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
320
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
740
Producing Creativity
orderedlist
PRO
348
41k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
230
ラッコキーワード サービス紹介資料
rakko
4
5.5M
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
43k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3.1k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
580
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
550
Designing Powerful Visuals for Engaging Learning
tmiket
1
620
Transcript
searchnos について npub1q7qyk7rvdga5qzmmyrvmlj29qd0n45snmfuhkrzsj4rk0sm4c4psvqwt9c 2023-03-10 Nostr 勉強会 #1
@darashi nostrbuzzs の作者です。
searchnos とは https://github.com/darashi/searchnos Nostrbuzzs に検索機能がほしい、けど... NIP-50 (Search Capability; 検索) 対応のリレーが少ないので、自分で作ってみまし
た。 リレー風のサーバですが、フル機能のリレーではありません。
None
考えたこと リレーを自前で作るのは大変そう 現状でも既に大変そう 今後の NIP に対応し続けるのも大変そう リレーを自前で運用するのも大変そう ユーザのリレーリストに追加してもらい、こちらにイベントを投げてもらわ ないといけない。 そのレベルのものを運用するのは大変そう。
→ イベントは既存のリレーから取得するのがよさそう。小判鮫的な。
しくみ searchnos indexer searcher relay-1 relay-2 Elasticsearch web-browser
indexer 指定したリレーに接続し、kind1 とkind5 を購読する。イベントに応じて Elasticsearch の状態を更新する。 searcher REQ が来たら、 Elasticsearch
にクエリを投げて、結果を返し、最後にEOSE を送る。 (内部的な)クエリ購読者リストに追加する。 一定時間ごとにポーリング 購読者があるクエリを順番に Elasticsearch に投げて、新着の結果を購読者に 流す。
client searcher Elasticsearch indexer relay loop loop REQ w/"search" 1
query 2 response 3 EVENT (if matched) 4 EVENT (if matched) 5 EOSE 6 kind:1 7 index request 8 wait 9 query 10 response 11 EVENT (if matched & unread) 12 CLOSE 13 client searcher Elasticsearch indexer relay
おもしろポイント 同じクエリを購読しているクライアントのクエリは、一つにまとめて Elasticsearch に投げる。 buzzphrases に関していうと、何人もが同じクエリを購読することがよくあ る。 Simple query string
query ※ を使っているので、複雑な条件を持つ検索ができる ※ https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-simple- query-string-query.html
まとめ 既存のリレーから note を収集し、 NIP-50 に対応した検索機能を提供するリレー っぽいサーバーを作った。
今後の課題 通常のフィルタ条件 (NIP-01) に対応する。 現状 limit にしか対応できていない kind:0 (NIP-01) にも対応する...?
購読者の多いクエリは頻繁にポーリングするなど、もう少し賢いクエリスケジュ ーリング。 言語推定と言語によるフィルタリングに対応する...? spam フィルタに対応する...? どうやって...? NIP-56 があるので、信頼できるユーザの pubkey を定義して、その kind:1984 から spam フィルタを学習する、とかはありかもしれない。 運用が大変そう...