Skip to content

Commit e5c7813

Browse files
committed
refactor: rename Data* search node types to Search* equivalents in node-type-registry
Renames: - DataEmbedding → SearchVector - DataFullTextSearch → SearchFullText - DataBm25 → SearchBm25 - DataSearch → SearchUnified - DataPostGIS → SearchSpatial - DataPostGISAggregate → SearchSpatialAggregate - DataTrgm → SearchTrgm Updates name, slug, category (data → search) in each definition. Updates comment references in graphile-search and graphile-postgis. No backward-compat aliases — clean rename only.
1 parent f1a0d43 commit e5c7813

10 files changed

Lines changed: 44 additions & 44 deletions

File tree

graphile/graphile-postgis/src/plugins/detect-extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const PostgisExtensionDetectionPlugin: GraphileConfig.Plugin = {
5050

5151
// PostGIS is detected when at least one of geometry or geography
5252
// codecs is present. Some databases use only geography columns
53-
// (e.g. use_geography: true in DataPostGIS), so PostGraphile may
53+
// (e.g. use_geography: true in SearchSpatial), so PostGraphile may
5454
// introspect geography but not geometry.
5555
if (!geometryCodec && !geographyCodec) {
5656
return build;

graphile/graphile-search/src/plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ interface SearchScoreDetails {
6868

6969
/**
7070
* Per-table search configuration read from the @searchConfig smart tag.
71-
* Written by DataFullTextSearch, DataBm25, and DataSearch in constructive-db.
71+
* Written by SearchFullText, SearchBm25, and SearchUnified in constructive-db.
7272
*/
7373
interface SearchConfig {
7474
weights?: Record<string, number>;
@@ -488,7 +488,7 @@ export function createUnifiedSearchPlugin(
488488
}
489489
}
490490

491-
// Read per-table @searchConfig smart tag (written by DataSearch/DataFullTextSearch/DataBm25)
491+
// Read per-table @searchConfig smart tag (written by SearchUnified/SearchFullText/SearchBm25)
492492
// Per-table config overrides global searchScoreWeights
493493
const tableSearchConfig = getSearchConfig(codec);
494494

graphql/node-type-registry/src/data/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ export { DataTimestamps } from './data-timestamps';
66
export { DataPeoplestamps } from './data-peoplestamps';
77
export { DataPublishable } from './data-publishable';
88
export { DataSoftDelete } from './data-soft-delete';
9-
export { DataEmbedding } from './data-embedding';
10-
export { DataFullTextSearch } from './data-full-text-search';
11-
export { DataBm25 } from './data-bm25';
12-
export { DataSearch } from './data-search';
13-
export { DataPostGIS } from './data-postgis';
14-
export { DataPostGISAggregate } from './data-postgis-aggregate';
9+
export { SearchVector } from './search-vector';
10+
export { SearchFullText } from './search-full-text';
11+
export { SearchBm25 } from './search-bm25';
12+
export { SearchUnified } from './search-unified';
13+
export { SearchSpatial } from './search-spatial';
14+
export { SearchSpatialAggregate } from './search-spatial-aggregate';
1515
export { DataJobTrigger } from './data-job-trigger';
1616
export { DataTags } from './data-tags';
1717
export { DataStatusField } from './data-status-field';
1818
export { DataJsonb } from './data-jsonb';
19-
export { DataTrgm } from './data-trgm';
19+
export { SearchTrgm } from './search-trgm';
2020
export { DataSlug } from './data-slug';
2121
export { DataInflection } from './data-inflection';
2222
export { DataOwnedFields } from './data-owned-fields';

graphql/node-type-registry/src/data/data-bm25.ts renamed to graphql/node-type-registry/src/data/search-bm25.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { NodeTypeDefinition } from '../types';
22

3-
export const DataBm25: NodeTypeDefinition = {
4-
"name": "DataBm25",
5-
"slug": "data_bm25",
6-
"category": "data",
3+
export const SearchBm25: NodeTypeDefinition = {
4+
"name": "SearchBm25",
5+
"slug": "search_bm25",
6+
"category": "search",
77
"display_name": "BM25 Search",
88
"description": "Creates a BM25 index on an existing text column using pg_textsearch. Enables statistical relevance ranking with configurable k1 and b parameters. The BM25 index is auto-detected by graphile-search.",
99
"parameter_schema": {

graphql/node-type-registry/src/data/data-full-text-search.ts renamed to graphql/node-type-registry/src/data/search-full-text.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { NodeTypeDefinition } from '../types';
22

3-
export const DataFullTextSearch: NodeTypeDefinition = {
4-
"name": "DataFullTextSearch",
5-
"slug": "data_full_text_search",
6-
"category": "data",
3+
export const SearchFullText: NodeTypeDefinition = {
4+
"name": "SearchFullText",
5+
"slug": "search_full_text",
6+
"category": "search",
77
"display_name": "Full-Text Search",
88
"description": "Adds a tsvector column with GIN index and automatic trigger population from source fields. Enables PostgreSQL full-text search with configurable weights and language support. Leverages the existing metaschema full_text_search infrastructure.",
99
"parameter_schema": {

graphql/node-type-registry/src/data/data-postgis-aggregate.ts renamed to graphql/node-type-registry/src/data/search-spatial-aggregate.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import type { NodeTypeDefinition } from '../types';
22

3-
export const DataPostGISAggregate: NodeTypeDefinition = {
4-
"name": "DataPostGISAggregate",
5-
"slug": "data_postgis_aggregate",
6-
"category": "data",
7-
"display_name": "PostGIS Aggregate Geometry",
3+
export const SearchSpatialAggregate: NodeTypeDefinition = {
4+
"name": "SearchSpatialAggregate",
5+
"slug": "search_spatial_aggregate",
6+
"category": "search",
7+
"display_name": "Spatial Aggregate Search",
88
"description": "Creates a derived/materialized geometry field on the parent table that automatically aggregates geometries from a source (child) table via triggers. When child rows are inserted/updated/deleted, the parent aggregate field is recalculated using the specified PostGIS aggregation function (ST_Union, ST_Collect, ST_ConvexHull, ST_ConcaveHull). Useful for materializing spatial boundaries from collections of points or polygons.",
99
"parameter_schema": {
1010
"type": "object",

graphql/node-type-registry/src/data/data-postgis.ts renamed to graphql/node-type-registry/src/data/search-spatial.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import type { NodeTypeDefinition } from '../types';
22

3-
export const DataPostGIS: NodeTypeDefinition = {
4-
"name": "DataPostGIS",
5-
"slug": "data_postgis",
6-
"category": "data",
7-
"display_name": "PostGIS Geometry",
3+
export const SearchSpatial: NodeTypeDefinition = {
4+
"name": "SearchSpatial",
5+
"slug": "search_spatial",
6+
"category": "search",
7+
"display_name": "Spatial Search",
88
"description": "Adds a PostGIS geometry or geography column with a spatial index (GiST or SP-GiST). Supports configurable geometry types (Point, Polygon, etc.), SRID, and dimensionality. The graphile-postgis plugin auto-detects geometry/geography columns by codec type for spatial filtering (ST_Contains, ST_DWithin, bbox operators).",
99
"parameter_schema": {
1010
"type": "object",

graphql/node-type-registry/src/data/data-trgm.ts renamed to graphql/node-type-registry/src/data/search-trgm.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { NodeTypeDefinition } from '../types';
22

3-
export const DataTrgm: NodeTypeDefinition = {
4-
"name": "DataTrgm",
5-
"slug": "data_trgm",
6-
"category": "data",
3+
export const SearchTrgm: NodeTypeDefinition = {
4+
"name": "SearchTrgm",
5+
"slug": "search_trgm",
6+
"category": "search",
77
"display_name": "Trigram Search",
88
"description": "Creates GIN trigram indexes (gin_trgm_ops) on specified text/citext fields for fuzzy LIKE/ILIKE/similarity search. Adds @trgmSearch smart tag for PostGraphile integration. Fields must already exist on the table.",
99
"parameter_schema": {

graphql/node-type-registry/src/data/data-search.ts renamed to graphql/node-type-registry/src/data/search-unified.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import type { NodeTypeDefinition } from '../types';
22

3-
export const DataSearch: NodeTypeDefinition = {
4-
"name": "DataSearch",
5-
"slug": "data_search",
6-
"category": "data",
3+
export const SearchUnified: NodeTypeDefinition = {
4+
"name": "SearchUnified",
5+
"slug": "search_unified",
6+
"category": "search",
77
"display_name": "Unified Search",
88
"description": "Composite node type that orchestrates multiple search modalities (full-text search, BM25, embeddings, trigram) on a single table. Configures per-table search score weights, normalization strategy, and recency boost via the @searchConfig smart tag.",
99
"parameter_schema": {
1010
"type": "object",
1111
"properties": {
1212
"full_text_search": {
1313
"type": "object",
14-
"description": "DataFullTextSearch parameters. Omit to skip FTS setup.",
14+
"description": "SearchFullText parameters. Omit to skip FTS setup.",
1515
"properties": {
1616
"field_name": {
1717
"type": "string",
@@ -51,7 +51,7 @@ export const DataSearch: NodeTypeDefinition = {
5151
},
5252
"bm25": {
5353
"type": "object",
54-
"description": "DataBm25 parameters. Omit to skip BM25 setup.",
54+
"description": "SearchBm25 parameters. Omit to skip BM25 setup.",
5555
"properties": {
5656
"field_name": {
5757
"type": "string"
@@ -74,7 +74,7 @@ export const DataSearch: NodeTypeDefinition = {
7474
},
7575
"embedding": {
7676
"type": "object",
77-
"description": "DataEmbedding parameters. Omit to skip embedding setup.",
77+
"description": "SearchVector parameters. Omit to skip embedding setup.",
7878
"properties": {
7979
"field_name": {
8080
"type": "string",

graphql/node-type-registry/src/data/data-embedding.ts renamed to graphql/node-type-registry/src/data/search-vector.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import type { NodeTypeDefinition } from '../types';
22

3-
export const DataEmbedding: NodeTypeDefinition = {
4-
"name": "DataEmbedding",
5-
"slug": "data_embedding",
6-
"category": "data",
7-
"display_name": "Embedding",
3+
export const SearchVector: NodeTypeDefinition = {
4+
"name": "SearchVector",
5+
"slug": "search_vector",
6+
"category": "search",
7+
"display_name": "Vector Search",
88
"description": "Adds a vector embedding column with HNSW or IVFFlat index for similarity search. Supports configurable dimensions, distance metrics (cosine, l2, ip), stale tracking strategies (column, null, hash), and automatic job enqueue triggers for embedding generation.",
99
"parameter_schema": {
1010
"type": "object",

0 commit comments

Comments
 (0)