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

moderation: added query match rule #1049

Merged
merged 2 commits into from
Nov 11, 2024
Merged

Conversation

0einstein0
Copy link
Member

@0einstein0 0einstein0 commented Nov 6, 2024

Closes Issue #1042

cli commands

Create percolator moderation index for records

invenio moderation create-queries-index -r records

Add a query

Defaults to score 10 and active True if not provided

invenio moderation add-query --query-strinf "metadata.title:Spam" --notes "New query" --score 13 --active True

Add queries from csv

Defaults to score 10 and active True if not provided
csv format

query_string1, notes, score, active
query_string2, notes, score, active
invenio moderation add-query -f .../queries.csv

@0einstein0 0einstein0 force-pushed the moderation-rules branch 4 times, most recently from 5ef0e19 to 857502d Compare November 7, 2024 09:00
@0einstein0 0einstein0 force-pushed the moderation-rules branch 2 times, most recently from e4a30b7 to 9b9e167 Compare November 8, 2024 08:17
Copy link
Member

@slint slint left a comment

Choose a reason for hiding this comment

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

Some minor things, but otherwise LGTM

site/zenodo_rdm/moderation/percolator.py Outdated Show resolved Hide resolved
site/zenodo_rdm/moderation/percolator.py Show resolved Hide resolved
site/zenodo_rdm/moderation/percolator.py Outdated Show resolved Hide resolved
site/zenodo_rdm/moderation/rules.py Outdated Show resolved Hide resolved
@0einstein0 0einstein0 force-pushed the moderation-rules branch 5 times, most recently from d72dadb to a39f1e1 Compare November 8, 2024 12:59
@slint slint merged commit 6210c61 into zenodo:master Nov 11, 2024
3 checks passed
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.

Store queries in DB table and index as OpenSearch percolators to allow for reverse lookup
2 participants