graphprotocol / graphprotocol/graph-node

full text search not working on string array fields

Offen
#1,818 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

area/graphql validation
Vorherrschende Sprache
Rust
Sterne
3.2k
Forks
1.1k
Ø Merge
4 T. 1 Std.
Gemergte PRs (30 T.)
1

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Reproduziere die gemeldete Volltextsuchkonfiguration mit String-Array-Feldern wie artistNames und tags und vergleiche sie anschließend mit der funktionierenden Konfiguration, die nur title und description enthält. Verfolge die Verarbeitung des Volltextsuchschemas und das Synchronisierungsverhalten beim Start. Erledigt bedeutet, dass nicht unterstützte Array-Felder zur Kompilierzeit klar abgelehnt werden oder dass Suche und Synchronisierung korrekt funktionieren.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
graphql, rust
Bereich
backend, search
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.