Skip to content

Refactor and improve MongoDB query handling and testing#1648

Open
jgaleotti wants to merge 4 commits into
masterfrom
refactor_mongo_truthness_2
Open

Refactor and improve MongoDB query handling and testing#1648
jgaleotti wants to merge 4 commits into
masterfrom
refactor_mongo_truthness_2

Conversation

@jgaleotti

Copy link
Copy Markdown
Collaborator
  • Introduced QueryOperationWithField to eliminate redundancy and unify field name handling across query operations.
  • Refactored MongoHeuristicsCalculator:
    • Extracted computeDistanceDocuments method for better encapsulation of document calculations.
    • Renamed methods for improved clarity and consistency.
    • Updated and added related tests to ensure correctness.
  • Enhanced MongoDB query selectors:
    • Utilized constant operators.
    • Added null checks to improve robustness.
    • Improved readability of the code.
  • Added comprehensive tests:
    • Covered invalid empty $and, $or, $nor queries.
    • Tested empty $all query scenario.
    • Introduced QueryParserTest for better test coverage.

…sistency and clarity, update tests accordingly.
…ts` method for handling document calculations, rename method for better clarity, and update related tests.
…` to eliminate redundancy and unify field name handling across query operations.
@jgaleotti
jgaleotti requested a review from arcuri82 July 21, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant