MorphiaOrg / MorphiaOrg/morphia

Add method to validate/compare mapped indexes with existing ones

Open
#703 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement proposed
Dominant language
Java
Stars
1.7k
Forks
449
Avg merge
7m
Merged PRs (30d)
10

Description

This would be a peer to ensureIndexes() that would take the mapped indexes and compare them with what's in the database. Possible options to the validator would be to log the differences, fail on diff, output the shell commands to create the missing/different indexes. Also, it should be configurable to allow ignoring indexes defined in the database that aren't mapped via morphia.

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 existing ensureIndexes() method and the code that reads mapped indexes and existing database indexes. Define the comparison and validation behavior for logging differences, failing, emitting shell commands, and optionally ignoring database-only indexes; done means these choices are implemented and covered by appropriate tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, mongodb
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.