Skip to content

Conversation

@ehanson8
Copy link
Contributor

Purpose and background context

Adds fulltext field to mapping for searching but excludes it from retrieval.

How can a reviewer manually see the effects of these changes?

I reindexed mitlibwebsite on Dev1 and confirmed the fulltext is indexed when I searched for each DataEng member's last name (hat tip @ghukill). This brought up our respective Staff Directory page despite our last name not appearing in any other fields for that page.

To repeat this check:

  1. Follow the instructions here to access the Dev1 OpenSearch dashboard:
  2. Click Interact with the OpenSearch API
  3. Enter GET mitlibwebsite/_search?q=<staff member last name> as seen below:
Screenshot 2025-12-16 at 9 44 11 AM
  1. Observe the appropriate Staff Directory pages in the results, as well as other pages where the last name appears (@jonavellecuerdo wins the highest result count)

Includes new or updated dependencies?

YES

Changes expectations for external applications?

NO

What are the relevant tickets?

Code review

  • Code review best practices are documented here and you are encouraged to have a constructive dialogue with your reviewers about their preferences and expectations.

Why these changes are being introduced:
* A new field, fulltext, is needed for TIMDEX sources

How this addresses that need:
* Update opensearch_mappings.json to include fulltext field during searching but exclude it from retrieval
* Add configure_index_settings unit test to confirm fulltext field is present in the loaded mapping
* Update dependencies

Side effects of this change:
* None

Relevant ticket(s):
* https://mitlibraries.atlassian.net/browse/USE-257
@ehanson8 ehanson8 requested a review from a team as a code owner December 16, 2025 14:53
Copy link
Contributor

@ghukill ghukill left a comment

Choose a reason for hiding this comment

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

Looks great! As you noted, not much code churn here, but thanks for the legwork confirming that it works.

Excellent foot in the door for full-text searching here.

@ehanson8 ehanson8 merged commit fc4a958 into main Dec 16, 2025
3 checks passed
@ehanson8 ehanson8 deleted the USE-257-fulltext branch December 16, 2025 15:13
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