Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Summary
This enhancement adds support for managing search presets in the Typesense Java client.
Rationale
By implementing search presets management, users can:
Changes
Added Features:
New Class
Presets.java
:upsert()
: Creates or updates a search preset with specified nameretrieve()
: Gets all available search presetsNew Class
Preset.java
:retrieve()
: Gets details of a specific search presetdelete()
: Removes a search presetClient Integration in
Client.java
:presets()
: New method providing access to global preset operationspresets(String presetId)
: Method for accessing individual preset operationsCode Changes:
Client.java
:Documentation Updates:
README.md
:Test Coverage:
New Test Class
PresetsTest.java
:Updates to
Helper.java
:Context
This implementation aligns with Typesense's search presets API endpoints and provides a Java-friendly interface for managing search configurations. The changes follow existing patterns in the client library for consistency and ease of use. All operations are properly tested and documented to ensure reliability and maintainability.
PR Checklist