feat(search)!: rename to de-overload “schema” in the search family#595
Open
ddeboer wants to merge 1 commit into
Open
feat(search)!: rename to de-overload “schema” in the search family#595ddeboer wants to merge 1 commit into
ddeboer wants to merge 1 commit into
Conversation
The family used “schema” at two granularities (design review §4.4): SearchType’s RDF-class field and the per-collection engine definition. After this, “schema” means only the whole set (SearchSchema, GraphQL schema). - SearchType.type → SearchType.class (the RDF class IRI; sh:targetClass) - buildCollectionSchema → buildCollectionDefinition; CollectionSchemaOptions → CollectionDefinitionOptions; collection-schema.ts → collection-definition.ts - keep SearchSchema, searchSchema(), SearchType, defineSearchType; kind stays a field-only discriminator - refresh the search READMEs and ADRs 3/4/8/9 BREAKING CHANGE: @lde/search SearchType.type is renamed to .class, and @lde/search-typesense buildCollectionSchema / CollectionSchemaOptions become buildCollectionDefinition / CollectionDefinitionOptions. @lde/search-pipeline and @lde/search-api-graphql adapt internally; their own public APIs are unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix #593.
The search family used “schema” at two granularities (design review §4.4): the whole declaration (
SearchSchema, correct — the SQL/namespace sense, and consistent with “GraphQL schema” = the whole API) and one type’s per-collection engine definition (buildCollectionSchema, borrowed from Typesense’s own vocabulary). Separately,SearchType.typeheld the RDF class IRI — a type’s type, colliding with TS/GraphQL “type”.This rename de-overloads it: after this, “schema” only ever means the whole set, and the two genuinely misleading names are gone.
Renames
SearchType.type→SearchType.class— the RDF class IRI it holds (sh:targetClass);kindstays the field-only discriminator, untouched.buildCollectionSchema→buildCollectionDefinition,CollectionSchemaOptions→CollectionDefinitionOptions, and the filecollection-schema.ts→collection-definition.ts. Elasticsearch calls this per-index thing a mapping; “definition” is the engine-neutral word, and it returns the whole create-definition (fields plus collection settings), sobuild+ the output noun.SearchSchema,searchSchema()(the bare-noun factory at the top-level entry point people type most),SearchType,defineSearchType(identity + literal capture — a define, not a build).Plus the search READMEs and ADRs 3/4/8/9 refreshed to the new vocabulary.
Breaking
@lde/search:SearchType.type→.class.@lde/search-typesense:buildCollectionSchema/CollectionSchemaOptions→buildCollectionDefinition/CollectionDefinitionOptions.@lde/search-pipelineand@lde/search-api-graphqladapt internally (they route/key on the renamed field); their own public APIs are unchanged.Pure rename — no behaviour change; the
generator-stabilitysnapshot is byte-identical (only its test-name key moved).