Add search synonyms

I have been reading a lot here lately and see that ‘post’ and ‘reply’ seem to be used somewhat interchangeably.

If this were done, it would result in fewer bothersome questions when someone uses the wrong one of the two for their searching before they ask a question with a new topic (LOL it just happened to me, ‘delete post after’ did not produce the same results as ‘delete reply after’…)

Hence my topic question…

「いいね!」 1

Reply and post are not 100% interchangeable. In most usage we see here on Meta they are, but not always.

I’d suggest reviewing Discourse New User Guide, which describes what a post is. A reply is any post that is not the OP.

「いいね!」 5

But I would rather find what I am searching for even if I do not know the correct terminology.

For those more ‘in the know’, would they not still have the option of doing explicit searches with quotes around their explicit term of interest, for example “reply” :question:

Thanks, I will read that but do many other people read that before they make new topics here?

So, I read the ‘Discourse New User Guide’ and I am unable to find any explicit definition of ‘reply’.

But as I have quoted you above, a ‘reply’ is necessarily a ‘post’, so when someone searches for ‘post’ all ‘reply’ matches should also be presented…

Whether, a search for ‘reply’ should bring up all ‘post’ entries is also unknown after reading that guide.

So, I would still like to have the request of this topics’ title, acted upon. (but again, that is only my opinion)

A reply is necessarily a post but some posts are not replies so searching on post should not automatically add the reply search term.

If your preference is satisfied then it will annoy other users like myself who are only searching for post and not reply.

「いいね!」 3

But you are obviously ‘in the know’ and would likely just use an explicit search term without bothering people here with a new topic about why so many search results for ‘post’ are showing up in your ‘reply’ searches.

Regardless of the semantics of post/reply — adding synonyms to search isn’t something that can be configured in Discourse at the moment.

「いいね!」 9

Ok, that shuts me up :wink: but perhaps there should be a way to add them, I predict it could lessen the burden on the good people who respond to newbies on this great forum :slight_smile:

Actually, I do general searches and then follow relevant links that have some overlap with what I’m searching for.

Search engines have an idea of which links are followed. Discourse has something similar. “Suggested messages” at the end of the topic are a fruitful source of relevant topics not directly related to the specific search terms.

「いいね!」 1

I am recategorizing it as feature the feature request is pretty clear to me. It is asking for a place in the UX to define custom synonyms.

Postgres technically supports synonyms per:

So if you wanted to get your gloves off and be mega technical you could wire something today, but I agree that some time in the future adding a UI to allow mods to define this may be interesting.

Not putting a pr-welcome on this cause it is complicated and would take quite a while to get right with possible limited benefit.

Timeframe wise I would say this is something I expect not to get to in the next year and probably to get to within the next 5 years.

「いいね!」 9

Congratulations Dale :partying_face:

image

「いいね!」 1

用語を更新しました(「User」を「Member」に変更)ので、ドキュメントも更新しましたが、「User」を検索した人が自動的に「Member」という結果を見られるようにしたいと考えています。これを実現する簡単な方法について、何か良いアイデアはありますでしょうか?

CC: @michellefs

それはかなり難しいですね。インデックス化されたデータに同義語を注入するプラグインを構築できるかもしれませんが、作業には1日から5日かかるでしょう。

ここでの大きな疑問は、これがあなたにとってどれほど重要かということです。実現可能ですが、当社のカスタムコンサルティングが必要になります。

「いいね!」 1

私は何も知りませんが、それはカスタマイズ側でテキストを変更するだけのことではありませんか?それとも、いつものように、私は完全に間違って理解していますか?

検索アルゴリズムに、タグの同義語のようなツールを通じて間接的に影響を与える能力を持たせることだと考えられます。ただし、投稿内のキーワード(少なくとも元の投稿のキーワード)に限られます。

ユースケースの例としては、コミュニティメンバーやサイト訪問者が、類似のブランド専門用語ではなく、日常的な言い回しで検索する場合が挙げられます。検索アルゴリズムは、まったく異なるトピックを優先します。当サイトでの例としては、「デスクトップアプリ」と「ネイティブクライアント」というトピックを検索する場合が考えられます。

長年にわたり、タイプミスに対する見解はどのように変化したのか興味があります。

Discourse-AI では、セマンティック検索の実験を開始しました。これはまだ初期段階であり、これらのシステムを現在も探索中です。

LLM を使用して検索プロンプトを改善することも、可能なアプローチです(ただし、現在は遅いです)。

この技術については、こちらで言及されています: GitHub - texttron/hyde: HyDE: Precise Zero-Shot Dense Retrieval without Relevance Labels


100% 自動化されたアプローチ以外にも

ここでの一般的な戦略は、反復することです。製品にはすでに「監視単語」がありますが、「検索同義語」を追加する機能があれば、一般的なタイポや「詰め込みたい」一般的なフレーズを指定できます。これはスケジュールされた作業ではありませんが、スポンサーシップを検討できるものです。

Postgres のこちらに、この正確な機能の前例があります: https://www.postgresql.org/docs/current/textsearch-dictionaries.html#TEXTSEARCH-SYNONYM-DICTIONARY

私が検討に前向きなもう一つの領域(ただし、乗り気ではない)は、投稿に非表示の「メタデータ」領域を設けることで、管理者が検索語を詰め込むことができます。これは非常に目立たず、一般的には、隠されないように「適切に」詰め込むことをお勧めします。たとえば、

SEO

セマンティック、関連性、改善

「いいね!」 2

Shocked Cosmo Kramer GIF

これは純粋な天才的なアイデアであり、埋め込みベースの検索の主な問題である、ユーザーの入力が悪いという問題を解決します。

そして、検索クエリを「充実させる」という小さなステップを追加するだけで、既存のセットアップから最小限の変更で済みます :exploding_head:


このトピックに関して、私たちができることの1つは、ハイブリッド検索を行うことです。

  • 既存のPG全文検索を使用して検索
  • 埋め込みを使用して検索
  • 両方の最適な50件の結果を収集
  • 検索再ランクサービスに渡す
  • 再ランクされた結果を表示する

私たちはすでに、既存の埋め込みAPIで、別のエンドポイントの下で、非常に有能な再ランクを配信しています。これは、すべて必要なコンポーネントが準備ができていることを意味します。

例はこちら:

https://github.com/pgvector/pgvector-python/blob/master/examples/hybrid_search.py#L67-L70

「いいね!」 6