Skip to content

Bug fix: Allow empty title field after tokenization - #24

Merged
msfroh merged 1 commit into
opensearch-project:mainfrom
kevinawskendra:empty-title
Nov 10, 2022
Merged

Bug fix: Allow empty title field after tokenization#24
msfroh merged 1 commit into
opensearch-project:mainfrom
kevinawskendra:empty-title

Conversation

@mahitamahesh

@mahitamahesh mahitamahesh commented Nov 10, 2022

Copy link
Copy Markdown
Contributor

Description

If there are no tokens from tokenizing the title field, pass null to Kendra instead of empty list.

Issues Resolved

N/A

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • 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.

Signed-off-by: Mahita Mahesh <mahitam@amazon.com>
@mahitamahesh
mahitamahesh marked this pull request as ready for review November 10, 2022 17:43
@mahitamahesh
mahitamahesh requested a review from a team November 10, 2022 17:43
@@ -111,6 +111,10 @@ public SearchHits transform(final SearchHits hits,
List<String> tokenizedTitle = null;
if (queryParserResult.getTitleFieldName() != null) {
tokenizedTitle = textTokenizer.tokenize(docSourceMap.get(queryParserResult.getTitleFieldName()).toString());

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@msfroh
msfroh merged commit 713d741 into opensearch-project:main Nov 10, 2022
msfroh pushed a commit that referenced this pull request Nov 23, 2022
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.

2 participants