graphprotocol / graphprotocol/graph-node

full text search not working on string array fields

オープン
#1,818 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

area/graphql validation
主要言語
Rust
スター
3.2k
フォーク
1.1k
平均マージ
4日 1時間
マージ済み PR(30日)
1

説明

Hi, I am trying to implement a full text search on a one entity called File and it has a few fields which are arrays of strings. Right now if I implement the subgraph including these fields, it won't throw any compile errors but the search won't work and the subgraph itself stuck on the startup(start block). I waited for an hour and it didn't sync further.
This is the query I did :

type _Schema_
    @fulltext(
        name: "fileSearch"
        language: en
        algorithm: rank
        include: [
            {
                entity: "File"
                fields: [
                    { name: "title" }
                    { name: "artistNames" }
                    { name: "description" }
                    { name: "tags" }
                ]
            }
        ]
    )

Now if I remove fields artistNames and tags, in less than a few minutes it syncs many blocks and search also works fine.
The new search will look like this :

type _Schema_
    @fulltext(
        name: "fileSearch"
        language: en
        algorithm: rank
        include: [
            {
                entity: "File"
                fields: [{ name: "title" }, { name: "description" }]
            }
        ]
    )

I think even if searching string arrays is not implemented, at least there should be an error during the compile time.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

artistNames や tags などの文字列配列フィールドを含む、報告された全文検索設定を再現し、title と description のみを含む動作する設定と比較します。全文検索スキーマの処理と、起動時の同期動作を追跡します。未対応の配列フィールドがコンパイル時に明確に拒否されるか、検索と同期が正しく動作すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
graphql, rust
領域
backend, search
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。