graphprotocol / graphprotocol/graph-node

[Feature] Add a graphman command to re-create full-text-search columns (tsvector)

Open
#5,802 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/graphman enhancement ops Stale
Dominant language
Rust
Stars
3.2k
Forks
1.1k
Avg merge
4d 1h
Merged PRs (30d)
1

Description

Description

Reasoning: We hit an issue where some entries in a full-text-search column were actually null.

While the cause is unknown and that situation may not be relevant to other indexers (?), the fix was actually trivial:

update sgdXXX.subgraph_meta set 
subgraph_metadata_search = to_tsvector('english', COALESCE(display_name,'')) || to_tsvector('english', COALESCE(description, ''))
where subgraph_metadata_search is null

This mechanism (as well as searching for null values in that fulltext-search columns, for sanity checking), could easily be implemented in graphman for the next person who hits this.

Are you aware of any blockers that must be resolved before implementing this feature? If so, which? Link to any relevant GitHub issues.

No response

Some information to help us out
  • Tick this box if you plan on implementing this feature yourself.
  • I have searched the issue tracker to make sure this issue is not a duplicate.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the graphman command entry point and inspect how database maintenance commands are structured. Use the issue's PostgreSQL tsvector update and null-checking queries as the behavioral reference; done means graphman can recreate the full-text-search columns and identify null values. No file or test path is named, and the issue indicates that its author planned to implement it.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgres, rust
Domain
cli, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.