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

Bug fix: Fix NPE when parsing field names in query parser. #23

Merged
merged 1 commit into from
Nov 10, 2022

Conversation

mahitamahesh
Copy link
Contributor

Description

Bug fix: Fix NPE when parsing field names in query parser.

Issues Resolved

No existing issue

Check List

  • [Y ] New functionality includes testing.
    • [Y ] All tests pass
  • [N/A ] New functionality has been documented
    • [N/A ] New functionality has javadoc added
  • [Y ] Commits are signed as per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@mahitamahesh mahitamahesh marked this pull request as ready for review November 10, 2022 15:09
@mahitamahesh mahitamahesh requested a review from a team November 10, 2022 15:09
Comment on lines 29 to 32
private static final String QUERY_PARSER_RESULT_LOG =
"Kendra Intelligent Ranker query parser result for query type [%s]: queryText: %s, bodyField: %s, titleField: %s";
private static final String QUERY_PARSER_RESULT_LOG_WITHOUT_TITLE =
"Kendra Intelligent Ranker query parser result for query type [%s]: queryText: %s, bodyField: %s";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we want to enable logging for all queries sent to Kendra?

My big concern with that is a) the increase in the volume of stuff that we're logging and b) the risk of logging user queries without conscious action on the part of the admin.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, especially with (b)

How about making this a debug log and removing the query text, but keeping body and title field names? It's difficult to debug which fields got sent to Kendra, especially since the title is optional.

Copy link
Collaborator

@msfroh msfroh Nov 10, 2022

Choose a reason for hiding this comment

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

I think I'm okay with keeping it at INFO level, as long as we remove the query text.

The query text logging specifically is the part that I'm a little nervous about.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed

* Update gitignore for Intellij

Signed-off-by: Mahita Mahesh <mahitam@amazon.com>
@msfroh msfroh merged commit 961acc2 into opensearch-project:main Nov 10, 2022
msfroh pushed a commit that referenced this pull request Nov 23, 2022
* Update gitignore for Intellij

Signed-off-by: Mahita Mahesh <mahitam@amazon.com>

Signed-off-by: Mahita Mahesh <mahitam@amazon.com>
Co-authored-by: Mahita Mahesh <mahitam@amazon.com>
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.

3 participants