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

Modify the search response to exclude the attachments from the response #3498

Closed
chouinar opened this issue Jan 13, 2025 · 0 comments · Fixed by #3531
Closed

Modify the search response to exclude the attachments from the response #3498

chouinar opened this issue Jan 13, 2025 · 0 comments · Fixed by #3531
Assignees

Comments

@chouinar
Copy link
Collaborator

Summary

We don't need the attachments in the search results, and parsing the large text responses would be a lot of extra parsing, so we shouldn't have OpenSearch return them.

This can be done by adding _source_excludes=field1,field2 to the query we send to OpenSearch (_search_excludes is also a param that the search client we use takes in).

Acceptance criteria

  1. Modified the search method of our opensearch client to pass through an optional excludes param
  2. Modified our search API to set the attachments field to be excluded
@chouinar chouinar moved this from Icebox to Todo in Simpler.Grants.gov Product Backlog Jan 13, 2025
@babebe babebe self-assigned this Jan 13, 2025
@babebe babebe moved this from Todo to In Progress in Simpler.Grants.gov Product Backlog Jan 14, 2025
@babebe babebe moved this from In Progress to In Review in Simpler.Grants.gov Product Backlog Jan 15, 2025
babebe added a commit that referenced this issue Jan 16, 2025
## Summary
Fixes #{[3498](#3498)}

### Time to review: __5 mins__

## Changes proposed
Modified the search method of our opensearch client to pass through an
optional excludes param
Modified our search API to set the attachments field to be excluded

---------

Co-authored-by: nava-platform-bot <[email protected]>
@babebe babebe linked a pull request Jan 16, 2025 that will close this issue
@babebe babebe moved this from In Review to Done in Simpler.Grants.gov Product Backlog Jan 16, 2025
@babebe babebe closed this as completed by moving to Done in Simpler.Grants.gov Product Backlog Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants