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

Disallow Search Alert updates from changing the search type #4925

Open
albertisfu opened this issue Jan 14, 2025 · 3 comments
Open

Disallow Search Alert updates from changing the search type #4925

albertisfu opened this issue Jan 14, 2025 · 3 comments

Comments

@albertisfu
Copy link
Contributor

In #4918 I found that it can be problematic if a user updates one of their Search Alerts via the API and changes the query to a new search type.

For instance, if the update goes from q=test&type=oaq=test1&type=r.

In this case, the alert will be indexed into the RECAP percolator, but it will remain in the Oral Arguments percolator. This can lead to orphaned alerts in the index that will continue to be triggered.

The solution is to disable the ability to change the search type in an Alert. We can enforce this validation at the model level, ensuring that both the API and the frontend benefit from it. Although it is unlikely to happen in the frontend since the search type is a hidden field in the Alert form, adding the validation at the model level ensures this issue is avoided even if a user modifies the HTML before submitting the form.

@mlissner
Copy link
Member

What's your size estimate for this, Alberto?

@albertisfu
Copy link
Contributor Author

I think this is "small" size.

@mlissner
Copy link
Member

Great. Let's see if this becomes a problem, and we can revisit it if so.

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

No branches or pull requests

2 participants