Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-5277 Add check for geospatial lucene answers #5278

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

ate47
Copy link
Contributor

@ate47 ate47 commented Mar 26, 2025

GitHub issue resolved: #5277

Briefly describe the changes proposed in this PR:

I have added a validation step before returning the geometries obtained by the search index. This step is done by reusing the rdf4j-queryalgebra-geosparql functions.


PR Author Checklist (see the contributor guidelines for more details):

  • my pull request is self-contained
  • I've added tests for the changes I made
  • I've applied code formatting (you can use mvn process-resources to format from the command line)
  • I've squashed my commits where necessary
  • every commit message starts with the issue number (GH-xxxx) followed by a meaningful description of the change

@ate47 ate47 marked this pull request as ready for review March 26, 2025 14:39
@ate47
Copy link
Contributor Author

ate47 commented Mar 28, 2025

You took care of my previous Lucene PR, can you get a look at this one @hmottestad?

Comment on lines +871 to +874
} else if (GEOF.EH_COVERED_BY.stringValue().equals(relation)) {
return GEOF.SF_WITHIN;
} else if (GEOF.EH_COVERS.stringValue().equals(relation)) {
return GEOF.EH_CONTAINS;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems that everything else maps to itself expect for these two. Could you add a comment explaining why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem with this part is similar to this check:

https://github.com/ate47/rdf4j/blob/GH-5277-bad-geo-lucene-answers/core/sail/lucene/src/main/java/org/eclipse/rdf4j/sail/lucene/impl/LuceneIndex.java#L915

Which is badly made and would require another issue/pr.

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.

2 participants