全文検索を実行するためのフラット テーブルがありますが、最も単純な検索でも機能しません。私は多くのことを試しましたが、同じ結果が得られています。しかし驚くべきことは、同様の全文検索が同じデータベース内の他のテーブルでも機能することです。
以下は私のテーブル構造です。クイック リファレンス用に全文索引の詳細も追加しました。
以下は私のクエリの検索結果です。運がなくても複数のことを試しました。クエリは、列から正確な値を提供した場合にのみ機能します。 クエリで 1 つの列、つまり Fname のみを使用しても、検索結果は同じです。
基本的なことが欠けているかもしれませんが、それが何であるかはわかりません。以下は、そのためのテーブル作成スクリプトです。
CREATE TABLE [dbo].[SampleTable](
[ID] [int] IDENTITY(1,1) NOT NULL,
[CID] [int] NOT NULL,
[VID] [int] NOT NULL,
[FID] [int] NOT NULL,
[TID] [int] NOT NULL,
[FName] [nvarchar](200) NOT NULL,
[IName] [nvarchar](200) NOT NULL,
[Contents] [nvarchar](max) NOT NULL,
[LatestVersion] [int] NOT NULL,
CONSTRAINT [PK_SampleTable] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'climate.c','climate_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'flowrout.c','validateTreeLayout','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'flowrout.c','validateGeneralLayout','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'gage.c','gage_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'gwater.c','gwater_validateAquifer','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'gwater.c','gwater_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'lid.c','lid_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'lid.c','validateLidProc','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'lid.c','validateLidGroup','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'link.c','link_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'link.c','conduit_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'link.c','pump_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'link.c','orifice_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'link.c','weir_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'node.c','node_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'node.c','divider_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'project.c','project_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'rdii.c','validateRdii','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'shape.c','shape_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'snow.c','snow_validateSnowmelt','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'subcatch.c','subcatch_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'table.c','table_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'transect.c','transect_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'climate.c','climate_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'flowrout.c','validateTreeLayout','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'flowrout.c','validateGeneralLayout','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'gage.c','gage_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'gwater.c','gwater_validateAquifer','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'gwater.c','gwater_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'lid.c','lid_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'lid.c','validateLidProc','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'lid.c','validateLidGroup','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'link.c','link_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'link.c','conduit_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'link.c','pump_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'link.c','orifice_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'link.c','weir_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'node.c','node_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'node.c','divider_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'project.c','project_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'rdii.c','validateRdii','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'shape.c','shape_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'snow.c','snow_validateSnowmelt','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'subcatch.c','subcatch_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'table.c','table_validate','',5);
insert into SampleTable (CID, VID, FID, TID, FName, IName, Contents, LatestVersion) values (-1,1,1,1,'transect.c','transect_validate','',5);
詳細が必要な場合はお知らせください。
更新 1: これをさらに掘り下げると、私のような質問が見つかりました。
したがって、これらの URL が正しく理解されている場合、FreeTextTable は 1 つの単語では機能しません。これは、別のテーブルで 1 つの単語クエリを使用しているため、正しく機能しません。