lucene icon indicating copy to clipboard operation
lucene copied to clipboard

refactor(13710): Refactor PointRangeQuery and PointRangeWeight to use PointQueryUtils for Point Range Logic

Open vijaykriishna opened this issue 2 months ago • 3 comments

Title: [#13710] refactor(PointRangeQuery): Refactor PointRangeQuery to separate createWeight function implementtion to PointRangeWeight using PointQueryUtils.

Description

This PR refactors the Lucene core point range query implementation to improve code reuse and maintainability:

  • Introduced: PointQueryUtils utility class to encapsulate common logic for validating point values and determining spatial relations between query ranges and indexed point ranges.
  • Updated: PointRangeQuery and PointRangeWeight to use methods from PointQueryUtils instead of duplicating logic.
  • Added and Improved: Javadocs for PointRangeWeight, PointQueryUtils, and the new package org.apache.lucene.util.search.
  • Exported: org.apache.lucene.util.search package in the module descriptor to resolve modular test failures.
  • Ensured all usages of point range validation and relation checks are routed through the new utility class for consistency.

This refactoring does not change any external behaviour but improves code clarity, testability, and modularity. All existing tests pass.

vijaykriishna avatar Oct 04 '25 21:10 vijaykriishna

This PR does not have an entry in lucene/CHANGES.txt. Consider adding one. If the PR doesn't need a changelog entry, then add the skip-changelog label to it and you will stop receiving this reminder on future updates to the PR.

github-actions[bot] avatar Oct 04 '25 21:10 github-actions[bot]

This PR does not have an entry in lucene/CHANGES.txt. Consider adding one. If the PR doesn't need a changelog entry, then add the skip-changelog label to it and you will stop receiving this reminder on future updates to the PR.

github-actions[bot] avatar Oct 04 '25 21:10 github-actions[bot]

This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the [email protected] list. Thank you for your contribution!

github-actions[bot] avatar Oct 19 '25 00:10 github-actions[bot]