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

feat(stemming): add stemming dictionary management support #81

Merged
merged 4 commits into from
Feb 16, 2025

Conversation

tharropoulos
Copy link
Contributor

Change Summary

This pull request introduces a new feature for managing stemming dictionaries in the client, introduced as part of the upcoming v28 release. The changes include adding new classes for stemming functionality, updating the Client class to incorporate stemming, and adding tests for the new feature.

Stemming functionality:

  • src/Client.php: Added a new Stemming property and corresponding getter method to the Client class. Updated the constructor to initialize the Stemming property.
  • src/Stemming.php: Introduced a new Stemming class with methods to manage stemming dictionaries.
  • src/StemmingDictionaries.php: Added a StemmingDictionaries class implementing ArrayAccess to manage individual stemming dictionaries.
  • src/StemmingDictionary.php: Created a StemmingDictionary class to handle operations on individual stemming dictionaries.

Tests:

  • implement dictionary upsert and retrieve operations
  • add client support for stemming feature
  • add tests for dictionary operations

PR Checklist

Copy link
Member

@jasonbosco jasonbosco left a comment

Choose a reason for hiding this comment

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

Looks like test are failing

@tharropoulos
Copy link
Contributor Author

tharropoulos commented Feb 6, 2025

Looks like test are failing

It was because of the Typesense version on the CI pipeline

- add `Stemming`, `StemmingDictionaries`, and `StemmingDictionary` classes
- implement dictionary upsert and retrieve operations
- add client support for stemming feature
- add tests for dictionary operations
- add null check in `StemmingDictionaries::retrieve()` to return empty dict
- add setup method to initialize dictionary before tests
- fix typo in test method name from `Rules` to `Dictionaries`
@tharropoulos tharropoulos force-pushed the v28-changes branch 2 times, most recently from 832d91a to 1e28547 Compare February 16, 2025 10:44
@jasonbosco jasonbosco merged commit 46c55d8 into typesense:master Feb 16, 2025
1 check passed
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