Materials-Consortia / Materials-Consortia/optimade-python-tools

Automatically disable sorting on un-indexed fields

Open
#2,258 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
91
Forks
54
PR merge metrics
No merged PRs in 30d

Description

It can be quite easy to waste a lot of cycles by sorting on unindexed fields in the default MongoDB implementation. There should be a config option to prevent such sorts at the API level, or to explicitly list fields that are available for sorting.

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 by locating the default MongoDB implementation and the API-level sorting and configuration paths. Determine whether the project should reject unindexed sorts or accept an explicit list of sortable fields, then add tests showing the selected behavior is enforced.

Written by the indexing model from the issue text.

Assessment

Tech stack
mongodb, python
Domain
api, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.