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

Change before and after filters in legal proximity search #6128

Merged

Conversation

tmpayton
Copy link
Contributor

@tmpayton tmpayton commented Feb 6, 2025

Summary (required)

This PR changes the meaning of the proximity_filter to mean that the proximity_filter_term comes before or after the q_proximity terms.

Required reviewers 1 - 2 developers

Impacted areas of the application

General components of the application that this PR will affect:

  • legal search

How to test

  • checkout this branch
  • start elasticsearch ./elasticsearch
  • pytest
  • create case index: python cli.py create_index case_index
  • load sample data for mur ) : python cli.py load_current_murs
  • see test URLs below

Test URLs reference the following documents: MUR 8285

http://127.0.0.1:5000/v1/legal/search/?q_proximity=Dowell%20daunting&max_gaps=2&proximity_filter=after&proximity_filter_term=remediation

http://127.0.0.1:5000/v1/legal/search/?q_proximity=Dowell%20daunting&max_gaps=2&proximity_filter=before&proximity_filter_term=remediation

@tmpayton tmpayton requested a review from cnlucas February 6, 2025 16:09
@tmpayton tmpayton changed the base branch from develop to release/public-20250211 February 6, 2025 16:09
@tmpayton tmpayton requested review from pkfec and fec-jli February 6, 2025 16:10
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.51%. Comparing base (6d7e30d) to head (06182ec).
Report is 2 commits behind head on release/public-20250211.

Additional details and impacted files
@@                     Coverage Diff                     @@
##           release/public-20250211    #6128      +/-   ##
===========================================================
- Coverage                    88.53%   88.51%   -0.03%     
===========================================================
  Files                           82       82              
  Lines                         9191     9191              
===========================================================
- Hits                          8137     8135       -2     
- Misses                        1054     1056       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@fec-jli fec-jli left a comment

Choose a reason for hiding this comment

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

Test locally, it works as expected. Good job.
Thanks

Copy link
Contributor

@pkfec pkfec left a comment

Choose a reason for hiding this comment

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

@tmpayton proximity_filter before/after works nicely.

@tmpayton tmpayton changed the title Change before and after filters Change before and after filters in legal proximity search Feb 10, 2025
Copy link
Member

@cnlucas cnlucas left a comment

Choose a reason for hiding this comment

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

Great job, @tmpayton

@cnlucas cnlucas merged commit dd107c4 into release/public-20250211 Feb 10, 2025
3 checks passed
@cnlucas cnlucas deleted the feature/6127-fix-proximity-filter-term-order branch February 10, 2025 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Change the proximity filter term order
5 participants