Support GIN indexes for queryables
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 56/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- helm, postgresql, python
- Domain
- databases, infrastructure
Research direction
Start by inspecting the Helm values and chart definitions for queryable indexFields, then read the pypgstac issue linked as #484 and the pgSTAC settings-table approach. Done means GIN can be selected for array fields, BTREE remains the default, and the resulting database state is version-controlled and repeatable without manual SQL changes.
Written by the indexing model from the issue text.
Description
When we load "queryables" (the list of fields you're allowed to search/filter on in STAC) into pgSTAC, we use pypgstac. This tool builds a search index for each field so lookups are fast, but it only ever builds one kind of index: BTREE.
That's a problem for fields that hold lists of values (arrays), like a tags or categories field. To search those fast, Postgres needs to build a GIN index, which is built specifically for searching inside lists. There's currently no setting/flag in the pypgstac to ask for GIN instead, it always picks BTREE for you.
@bitner confirmed this in this comment: the only way to actually change the index type right now is to log into the database and manually run a SQL command to fix it. We don't want to do that, because it means the database no longer matches what's written in our Helm chart / git repo. The next person who redeploys wouldn't know that manual change ever happened.
Ideas
Keep everything defined in our Helm values (no manual database edits), but add a way to say which index type each field should get. For example:
indexFields:
- name: "tags"
type: "gin"
- name: "roles" # no type = keep using BTREE, like today
Behind the scenes, the job either needs to set the index type for each field directly in pgSTAC's own settings table, or pypgstac adds support for defining the index type (see https://github.com/stac-utils/pgstac/issues/484)
The point is, we want to automate the changes instead of doing it by hand, so it stays version-controlled and repeatable.
- Dominant language
- Python
- Stars
- 34
- Forks
- 17
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 56
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from developmentseed/eoapi-k8s
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
developmentseed/eoapi-k8s#713 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 38/100
developmentseed/eoapi-k8s#708 · 5 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
developmentseed/eoapi-k8s#703 ·
Maintainers usually reply within 1 day
-
ci: proposal of vulnerability scanning pipeline of the chart's imagesPossibly taken @lhoupert claimed this 16 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 45/100
developmentseed/eoapi-k8s#685 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
developmentseed/eoapi-k8s#681 · 5 comments · 1 reaction ·
Maintainers usually reply within 1 day
All issues in developmentseed/eoapi-k8s
Similar issues
-
Task select patterns with uppercase letters never matchPossibly taken @manobhisriram claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
app: scripts status: backlog type: housekeeping
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
netbox-community/netbox-scripts#239 ·
Maintainers usually reply within 1 day
-
Lambda deploys fail once the bundle grows by about 254 KBPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
developmentseed/titiler-cmr#341 ·
Maintainers usually reply within 1 day
-
Card tables add "..." to every value in a DataFrame column when any value is longer than 30 charactersPossibly taken @omkarbandikatte claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day