Conversation
Reviewer's GuideAdds support for Typesense v30.0 by updating the OpenAPI spec for new synonym/curation set APIs and schema changes, aligning search parameters and analytics types with v30.0 behavior, updating documentation and CI to target v30.0, and marking legacy overrides endpoints as deprecated. ER diagram for new synonym_sets and curation_sets APIserDiagram
SynonymSet {
string name PK
string description
}
SynonymItem {
string id PK
string[] synonyms
string root
string locale
string[] symbols_to_index
string[] symbols_to_ignore
}
CurationSet {
string name PK
string description
}
CurationItem {
string id PK
string filter_by
boolean remove_matched_tokens
string sort_by
string replace_query
boolean filter_curated_hits
int effective_from_ts
int effective_to_ts
boolean stop_processing
}
CurationRule {
string[] tags
string query
string match
string filter_by
}
CurationInclude {
string id
int position
}
CurationExclude {
string id
}
SynonymSet ||--o{ SynonymItem : contains
CurationSet ||--o{ CurationItem : contains
CurationItem }o--|| CurationRule : uses
CurationItem ||--o{ CurationInclude : has
CurationItem ||--o{ CurationExclude : has
Class diagram for updated search and curation-related schemasclassDiagram
class FieldSchema {
string name
string type
string facet
string optional
string index
string reference
boolean async_reference
int num_dim
}
class SearchRequestParams {
string collection_name
string first_q
string q
int per_page
boolean filter_curated_hits
boolean enable_synonyms
string pinned_hits
string hidden_hits
string curation_tags
boolean enable_curations
boolean validate_field_names
}
class SearchResultHit {
object highlights
object document
number text_match
object text_match_info
object vector_distance
object hybrid_search_info
int search_index
}
class SearchHighlight {
string field
string snippet
string[] snippets
string value
string[] values
int[] indices
object[] matched_tokens
}
class MultiSearchParameters {
int limit_multi_searches
string x_typesense_api_key
}
class AnalyticsRule {
string name
AnalyticsRuleType type
string collection
string event_type
string filter_by
}
class AnalyticsRuleType {
}
class APIStatsResponse {
int query_search_events
int query_nohits_events
int query_fallback_events
int query_timeout_events
int query_error_events
int query_events
int doc_insert_events
int doc_update_events
int doc_delete_events
int doc_index_events
int query_counter_events
int doc_log_events
int doc_counter_events
}
class DropTokensMode {
}
class SynonymSetCreateSchema {
string description
SynonymItemCreateSchema[] items
}
class SynonymSetSchema {
string name
string description
SynonymItemSchema[] items
}
class SynonymItemUpsertSchema {
string[] synonyms
string root
string locale
string[] symbols_to_index
string[] symbols_to_ignore
}
class SynonymItemSchema {
string id
string[] synonyms
string root
string locale
string[] symbols_to_index
string[] symbols_to_ignore
}
class SynonymSetDeleteSchema {
string name
}
class SynonymItemDeleteSchema {
string id
}
class CurationRule {
string[] tags
string query
string match
string filter_by
}
class CurationInclude {
string id
int position
}
class CurationExclude {
string id
}
class CurationItemCreateSchema {
CurationRule rule
CurationInclude[] includes
CurationExclude[] excludes
string filter_by
boolean remove_matched_tokens
object metadata
string sort_by
string replace_query
boolean filter_curated_hits
int effective_from_ts
int effective_to_ts
boolean stop_processing
string id
}
class CurationItemSchema {
string id
CurationRule rule
CurationInclude[] includes
CurationExclude[] excludes
string filter_by
boolean remove_matched_tokens
object metadata
string sort_by
string replace_query
boolean filter_curated_hits
int effective_from_ts
int effective_to_ts
boolean stop_processing
}
class CurationSetCreateSchema {
CurationItemCreateSchema[] items
string description
}
class CurationSetSchema {
string name
CurationItemSchema[] items
string description
}
class CurationSetDeleteSchema {
string name
}
class CurationItemDeleteSchema {
string id
}
class ExportDocumentsParameters {
string filter_by
string include_fields
string exclude_fields
}
class ImportDocumentsParameters {
int batch_size
boolean return_id
int remote_embedding_batch_size
boolean return_doc
IndexAction action
DirtyValues dirty_values
}
class IndexAction {
}
class DirtyValues {
}
FieldSchema --> SearchRequestParams : used_by
SearchResultHit --> SearchHighlight : contains
SearchRequestParams --> CurationSetSchema : queries
SearchRequestParams --> SynonymSetSchema : uses_synonyms
SynonymSetCreateSchema <|-- SynonymSetSchema
SynonymItemUpsertSchema <|-- SynonymItemSchema
CurationSetCreateSchema <|-- CurationSetSchema
CurationItemCreateSchema <|-- CurationItemSchema
AnalyticsRule --> AnalyticsRuleType : has_type
ExportDocumentsParameters <.. SearchRequestParams : export_query
ImportDocumentsParameters <.. SearchRequestParams : import_query
DropTokensMode <.. SearchRequestParams : drop_tokens_mode
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| BestPractice | 1 minor |
| Security | 2 high |
TIP This summary will be updated as you push new changes. Give us feedback
There was a problem hiding this comment.
Hey - I've found 2 issues, and left some high level feedback:
- In
.github/workflows/ci_v30.0.yml, the cache keys referencesteps.beam.outputs.*but theSetup Elixir/OTPstep has noid: beam, so those expressions will be undefined and should either addid: beamor update the references to the actual step id. - The change from multiple flat query parameters to a single object parameter (e.g.
exportDocumentsParameters,importDocumentsParameters,multiSearchParameters) alters the public API shape and typical OpenAPI semantics for query params; consider either preserving the flat params or explicitly configuringstyle/explodeto ensure generated clients still send the individual query parameters that Typesense expects. - The type change for
DropTokensModefrom an object withmatchto a bare string enum is a breaking schema change for consumers of the generated client; if this is intentional, consider calling out the required migration and any expected request/response differences for existing users relying on the older structure.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `.github/workflows/ci_v30.0.yml`, the cache keys reference `steps.beam.outputs.*` but the `Setup Elixir/OTP` step has no `id: beam`, so those expressions will be undefined and should either add `id: beam` or update the references to the actual step id.
- The change from multiple flat query parameters to a single object parameter (e.g. `exportDocumentsParameters`, `importDocumentsParameters`, `multiSearchParameters`) alters the public API shape and typical OpenAPI semantics for query params; consider either preserving the flat params or explicitly configuring `style`/`explode` to ensure generated clients still send the individual query parameters that Typesense expects.
- The type change for `DropTokensMode` from an object with `match` to a bare string enum is a breaking schema change for consumers of the generated client; if this is intentional, consider calling out the required migration and any expected request/response differences for existing users relying on the older structure.
## Individual Comments
### Comment 1
<location path=".github/workflows/ci_v30.0.yml" line_range="137-146" />
<code_context>
+ run: mix format --check-formatted
+ if: ${{ matrix.lint }}
+
+ - name: Restore PLT cache
+ id: plt_cache
+ uses: actions/cache/restore@v4
+ with:
+ key: |
+ plt-${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-${{ steps.beam.outputs.elixir-version }}-${{ hashFiles('**/mix.lock') }}
+ restore-keys: |
+ plt-${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-${{ steps.beam.outputs.elixir-version }}-
+ path: |
+ priv/plts
+ if: ${{ matrix.lint }}
+
</code_context>
<issue_to_address>
**issue (bug_risk):** PLT cache keys reference `steps.beam` but there is no step with that id, so the cache will not work as intended
`steps.beam.outputs.otp-version` and `steps.beam.outputs.elixir-version` will be empty because the `Setup Elixir/OTP` step has no `id: beam`, so the cache key will be malformed and hurt cache effectiveness. Either add `id: beam` to the `erlef/setup-beam` step or switch the cache key to use `matrix.otp` and `matrix.elixir` instead.
</issue_to_address>
### Comment 2
<location path="CHANGELOG.md" line_range="16" />
<code_context>
+
+### Deprecated
+
+* Overrides (aka Curation Rules) no longer nested under Collections -> Curation Sets
+* TODO https://typesense.org/docs/30.0/api/#deprecations-behavior-changes
+
</code_context>
<issue_to_address>
**suggestion (typo):** Consider adding a verb to make this sentence grammatically complete.
For example: `Overrides (aka Curation Rules) are no longer nested under Collections -> Curation Sets`.
```suggestion
* Overrides (aka Curation Rules) are no longer nested under Collections -> Curation Sets
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| - name: Restore PLT cache | ||
| id: plt_cache | ||
| uses: actions/cache/restore@v4 | ||
| with: | ||
| key: | | ||
| plt-${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-${{ steps.beam.outputs.elixir-version }}-${{ hashFiles('**/mix.lock') }} | ||
| restore-keys: | | ||
| plt-${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-${{ steps.beam.outputs.elixir-version }}- | ||
| path: | | ||
| priv/plts |
There was a problem hiding this comment.
issue (bug_risk): PLT cache keys reference steps.beam but there is no step with that id, so the cache will not work as intended
steps.beam.outputs.otp-version and steps.beam.outputs.elixir-version will be empty because the Setup Elixir/OTP step has no id: beam, so the cache key will be malformed and hurt cache effectiveness. Either add id: beam to the erlef/setup-beam step or switch the cache key to use matrix.otp and matrix.elixir instead.
|
|
||
| ### Deprecated | ||
|
|
||
| * Overrides (aka Curation Rules) no longer nested under Collections -> Curation Sets |
There was a problem hiding this comment.
suggestion (typo): Consider adding a verb to make this sentence grammatically complete.
For example: Overrides (aka Curation Rules) are no longer nested under Collections -> Curation Sets.
| * Overrides (aka Curation Rules) no longer nested under Collections -> Curation Sets | |
| * Overrides (aka Curation Rules) are no longer nested under Collections -> Curation Sets |
There was a problem hiding this comment.
No application code in the PR — skipped Code Health checks.
See analysis details in CodeScene
Quality Gate Profile: The Bare Minimum
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
Closes #40
Summary by Sourcery
Add support for Typesense v30.0 by updating the OpenAPI specification, client documentation, and CI workflows.
New Features:
Enhancements:
CI:
Documentation: