Skip to content

Commit ea869ed

Browse files
authored
Merge pull request #954 from constructive-io/devin/1775097093-rename-search-node-types
refactor: rename Data* search node types to Search* equivalents in node-type-registry
2 parents cbc9961 + 02b66f2 commit ea869ed

12 files changed

Lines changed: 192 additions & 186 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/blueprint-types.generated.ts

Lines changed: 147 additions & 141 deletions
Large diffs are not rendered by default.

graphql/node-type-registry/src/codegen/generate-types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ function buildProgram(meta?: MetaTableInfo[]): string {
755755
const authzNodes = allNodeTypes.filter((nt) => nt.category === 'authz');
756756

757757
// -- Parameter interfaces grouped by category --
758-
const categoryOrder = ['data', 'authz', 'relation', 'view'];
758+
const categoryOrder = ['data', 'search', 'authz', 'relation', 'view'];
759759
for (const cat of categoryOrder) {
760760
const nts = categories.get(cat);
761761
if (!nts || nts.length === 0) continue;

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": {

0 commit comments

Comments
 (0)