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
480
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
370
nostrbuzzsのしくみ
dara
0
640
How nostrbuzzs works
dara
0
170
About searchnos
dara
0
170
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
990
JDK CHRONICLE
dara
2
8.9k
Timelapse Introduction
dara
1
710
Other Decks in Technology
See All in Technology
Azure Serverless 2026:Production-ready な AI エージェント基盤 / Azure Serverless 2026: Production-Ready AI Agent Platform
miyake
2
520
すぐできる衛星通信対応 あとは山奥に行くだけ
tatetate55
0
140
SREの視点で考えるSIEM活用術 〜AWS環境でのセキュリティ強化〜
cscengineer
PRO
0
200
What the customer really needed
kawaguti
PRO
3
220
`t*(42&t>>10)`だけで音楽が鳴る、Swiftで実装するBytebeat / iOSDC Japan 2026
yutailang0119
0
130
SREは、MCPとAutopilotをこう使え!
kazumax55
3
950
Issue 駆動でスペシャリストの意図を届ける、AI 実装のアクセシビリティ向上
thkt
0
130
GoのInterface内部構造から学ぶ!最高パフォーマンスを出すコード設計
yappli_developers
1
250
AIで社員の自主発信に広報目線を組み込む
_mossann_t
0
140
Slack上でインフラをトラブルシュートする! Agentic Platform Engineeringの第一歩
teru0x1
5
1.9k
その Lambda、8分で 管理者権限まで奪われます
k1nakayama
7
3.5k
Oracle Cloud Network Path Analyzerを試してみた/I Tried Out Oracle Cloud Network Path Analyzer
masakiokuda
1
110
Featured
See All Featured
A better future with KSS
kneath
240
18k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
280
Testing 201, or: Great Expectations
jmmastey
46
8.3k
WCS-LA-2024
lcolladotor
0
830
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
500
Optimizing for Happiness
mojombo
378
71k
Google's AI Overviews - The New Search
badams
0
1.6k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
300
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
520
Building an army of robots
kneath
307
46k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
Amusing Abliteration
ianozsvald
1
310
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 フィルタを学習する、とかはありかもしれない。 運用が大変そう...