@@ -58,7 +58,7 @@ describe('graphile-search (unified search plugin)', () => {
5858 createPgvectorAdapter ( ) ,
5959 ] ,
6060 enableSearchScore : true ,
61- enableFullTextSearch : true ,
61+ enableUnifiedSearch : true ,
6262 } ) ;
6363
6464 const testPreset = {
@@ -585,16 +585,16 @@ describe('graphile-search (unified search plugin)', () => {
585585 expect ( limitNodes [ 1 ] . rowId ) . toBe ( allNodes [ 1 ] . rowId ) ;
586586 } ) ;
587587
588- it ( 'fullTextSearch + per-adapter orderBy: LIMIT returns top results' , async ( ) => {
589- // fullTextSearch dispatches to all text-compatible adapters.
588+ it ( 'unifiedSearch + per-adapter orderBy: LIMIT returns top results' , async ( ) => {
589+ // unifiedSearch dispatches to all text-compatible adapters.
590590 // Per-adapter orderBy (e.g. BM25 score) still works correctly with LIMIT
591591 // because the adapter score is a SQL-level expression.
592592 // (Note: SEARCH_SCORE is a JS-computed composite and does not produce
593593 // SQL-level ORDER BY, so it should not be relied on with LIMIT.)
594594 const allResult = await query < AllDocumentsResult > ( `
595595 query {
596596 allDocuments(
597- where: { fullTextSearch : "machine learning" }
597+ where: { unifiedSearch : "machine learning" }
598598 orderBy: BODY_BM25_SCORE_ASC
599599 ) {
600600 nodes { rowId title bodyBm25Score }
@@ -609,7 +609,7 @@ describe('graphile-search (unified search plugin)', () => {
609609 const limitResult = await query < AllDocumentsResult > ( `
610610 query {
611611 allDocuments(
612- where: { fullTextSearch : "machine learning" }
612+ where: { unifiedSearch : "machine learning" }
613613 orderBy: BODY_BM25_SCORE_ASC
614614 first: 1
615615 ) {
@@ -732,18 +732,18 @@ describe('graphile-search (unified search plugin)', () => {
732732 }
733733 } ) ;
734734
735- it ( 'mega query v2: fullTextSearch + searchScore with composite ordering' , async ( ) => {
736- // Mega Query v2 — New-style: uses the unified `fullTextSearch ` composite
735+ it ( 'mega query v2: unifiedSearch + searchScore with composite ordering' , async ( ) => {
736+ // Mega Query v2 — New-style: uses the unified `unifiedSearch ` composite
737737 // filter that fans out to all text-compatible algorithms (tsvector, BM25, trgm)
738738 // with a single string, plus a manual pgvector filter for semantic search.
739739 // Orders by composite searchScore (highest overall relevance first).
740740 const result = await query < AllDocumentsResult > ( `
741741 query MegaQueryV2_UnifiedSearch {
742742 allDocuments(
743743 where: {
744- # fullTextSearch : single string fans out to tsvector + BM25 + trgm
744+ # unifiedSearch : single string fans out to tsvector + BM25 + trgm
745745 # automatically — no need to specify each algorithm separately
746- fullTextSearch : "machine learning"
746+ unifiedSearch : "machine learning"
747747
748748 # pgvector still needs its own filter (vectors aren't text)
749749 vectorEmbedding: { vector: [1, 0, 0], metric: COSINE }
@@ -757,7 +757,7 @@ describe('graphile-search (unified search plugin)', () => {
757757 title
758758 body
759759
760- # Per-adapter scores — populated by fullTextSearch for text algorithms
760+ # Per-adapter scores — populated by unifiedSearch for text algorithms
761761 tsvRank
762762 bodyBm25Score
763763 titleTrgmSimilarity
@@ -788,14 +788,14 @@ describe('graphile-search (unified search plugin)', () => {
788788 } ) ;
789789 } ) ;
790790
791- // ─── fullTextSearch composite filter ────────────────────────────────────
791+ // ─── unifiedSearch composite filter ────────────────────────────────────
792792
793- describe ( 'fullTextSearch composite filter' , ( ) => {
794- it ( 'fullTextSearch field exists on the filter type' , async ( ) => {
793+ describe ( 'unifiedSearch composite filter' , ( ) => {
794+ it ( 'unifiedSearch field exists on the filter type' , async ( ) => {
795795 const result = await query < AllDocumentsResult > ( `
796796 query {
797797 allDocuments(where: {
798- fullTextSearch : "learning"
798+ unifiedSearch : "learning"
799799 }) {
800800 nodes {
801801 title
@@ -813,7 +813,7 @@ describe('graphile-search (unified search plugin)', () => {
813813 const result = await query < AllDocumentsResult > ( `
814814 query {
815815 allDocuments(where: {
816- fullTextSearch : "machine learning"
816+ unifiedSearch : "machine learning"
817817 }) {
818818 nodes {
819819 title
@@ -843,7 +843,7 @@ describe('graphile-search (unified search plugin)', () => {
843843 const result = await query < AllDocumentsResult > ( `
844844 query {
845845 allDocuments(where: {
846- fullTextSearch : "learning"
846+ unifiedSearch : "learning"
847847 tsvTsv: "machine"
848848 }) {
849849 nodes {
@@ -856,15 +856,15 @@ describe('graphile-search (unified search plugin)', () => {
856856
857857 expect ( result . errors ) . toBeUndefined ( ) ;
858858 const nodes = result . data ?. allDocuments ?. nodes ?? [ ] ;
859- // The algorithm-specific filter (tsvTsv) narrows further within the fullTextSearch results
859+ // The algorithm-specific filter (tsvTsv) narrows further within the unifiedSearch results
860860 expect ( nodes ) . toBeDefined ( ) ;
861861 } ) ;
862862
863863 it ( 'returns empty results for nonsense query' , async ( ) => {
864864 const result = await query < AllDocumentsResult > ( `
865865 query {
866866 allDocuments(where: {
867- fullTextSearch : "xyzzy_nonexistent_term_12345"
867+ unifiedSearch : "xyzzy_nonexistent_term_12345"
868868 }) {
869869 nodes {
870870 title
@@ -908,22 +908,22 @@ describe('graphile-search (unified search plugin)', () => {
908908 } ) ;
909909} ) ;
910910
911- // ─── fullTextSearch disabled (separate suite — needs its own DB connection) ───
911+ // ─── unifiedSearch disabled (separate suite — needs its own DB connection) ───
912912
913- describe ( 'fullTextSearch can be disabled' , ( ) => {
913+ describe ( 'unifiedSearch can be disabled' , ( ) => {
914914 let disabledQuery : QueryFn ;
915915 let disabledTeardown : ( ( ) => Promise < void > ) | undefined ;
916916
917917 beforeAll ( async ( ) => {
918- // Build a plugin with fullTextSearch DISABLED
918+ // Build a plugin with unifiedSearch DISABLED
919919 const disabledPlugin = createUnifiedSearchPlugin ( {
920920 adapters : [
921921 createTsvectorAdapter ( ) ,
922922 createBm25Adapter ( ) ,
923923 createTrgmAdapter ( { defaultThreshold : 0.1 } ) ,
924924 ] ,
925925 enableSearchScore : true ,
926- enableFullTextSearch : false ,
926+ enableUnifiedSearch : false ,
927927 } ) ;
928928
929929 const disabledPreset = {
@@ -956,8 +956,8 @@ describe('fullTextSearch can be disabled', () => {
956956 }
957957 } ) ;
958958
959- it ( 'fullTextSearch field does NOT exist when disabled' , async ( ) => {
960- // Introspect the filter type to verify fullTextSearch is NOT present.
959+ it ( 'unifiedSearch field does NOT exist when disabled' , async ( ) => {
960+ // Introspect the filter type to verify unifiedSearch is NOT present.
961961 // NOTE: Grafast silently ignores unknown input fields rather than
962962 // returning a GraphQL validation error, so we verify via introspection.
963963 const introspection = await disabledQuery < any > ( `
@@ -973,10 +973,10 @@ describe('fullTextSearch can be disabled', () => {
973973 expect ( introspection . errors ) . toBeUndefined ( ) ;
974974 const filterFields = introspection . data ?. __type ?. inputFields ?. map ( ( f : any ) => f . name ) ?? [ ] ;
975975
976- // fullTextSearch should NOT be in the filter fields
977- expect ( filterFields ) . not . toContain ( 'fullTextSearch ' ) ;
976+ // unifiedSearch should NOT be in the filter fields
977+ expect ( filterFields ) . not . toContain ( 'unifiedSearch ' ) ;
978978
979- // The per-algorithm fields should still exist (only fullTextSearch is disabled)
979+ // The per-algorithm fields should still exist (only unifiedSearch is disabled)
980980 expect ( filterFields ) . toContain ( 'tsvTsv' ) ;
981981 expect ( filterFields ) . toContain ( 'bm25Body' ) ;
982982 expect ( filterFields ) . toContain ( 'trgmTitle' ) ;
0 commit comments