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

Scc 3874 #455

Merged
merged 8 commits into from
Feb 7, 2025
Merged

Scc 3874 #455

merged 8 commits into from
Feb 7, 2025

Conversation

danamansana
Copy link
Contributor

@danamansana danamansana commented Jan 28, 2025

Adds support for a new subject_prefix search parameter for SCC-3874
The approach taken parallels the existing implementation of the subject param.
Specific Changes:

  • Adds subject_prefix in ADVANCED_SEARCH_PARAMS and SEARCH_SCOPES for param extraction
  • Adds subject_prefix as a new case in building the ElasticQueryBuilder query
  • Currently adds some boosting for exact matches on subjectLiteral.raw in this case. The current boost is 50, could change that value
  • Adds a new test for this case
    Also:
  • a small unrelated addition to .gitignore for local files

params = parseSearchParams(params)

app.logger.debug('Parsed params: ', params)
Copy link
Member

Choose a reason for hiding this comment

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

Still need these debugs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd leave them in myself, but can remove them if that seems better

@danamansana
Copy link
Contributor Author

Made some changes following PR suggestions.
The query being generated is a bit different now. Previously it was more highly nested, so bool->must->bool->must->bool->should instead of bool->must->bool->should , and that bool->should->term which is supposed to be boosting exact matches on subjectLiteral.raw was also nested under the bool->should clause. The current query seems correct to me, but let me know if it seems wrong.
Also, I have added boosting for exact matches on parallelSubjectLiteral.raw, let me know if that isn't desired.

@danamansana danamansana merged commit a1e1b76 into main Feb 7, 2025
4 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.

2 participants