graphprotocol / graphprotocol/graph-node
full text search not working on string array fields
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3.2k
- Forks
- 1.1k
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported full-text search configuration with string-array fields such as artistNames and tags, then compare it with the working configuration containing only title and description. Trace the full-text search schema handling and startup sync behavior. Done means unsupported array fields are rejected clearly at compile time or search and synchronization work correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, rust
- Domain
- backend, search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100