When I search
contains an unexpected result is returned; the result contains numbers that are not matched to query. For example, I search using
'"5689523657*"' and get
5458976235, etc. as result. I rebuilt the index, but get the same result. What should I try? What did I miss?
The full query:
SELECT * FROM [Contractors] [contractor] INNER JOIN [ReportDates] [reportDate] ON [contractor].[ReportDateId] = [reportDate].[Id] LEFT JOIN [Persons] [tempPersons] ON [contractor].[PersonId] = [tempPersons].[Id] LEFT JOIN [Organizations] [tempOrganiztions] ON [contractor].[OrganizationId] = [tempOrganiztions].[Id] LEFT JOIN [Organizations] [tempHolding] ON [contractor].[HoldingId] = [tempHolding].[Id] WHERE CONTAINS(([contractor].[TaxIdentityNumber]), '"5689523657*"')
Running on SQL Server 2008 Standard Edition. Query to create full text index:
CREATE FULLTEXT CATALOG SPFTI; GO CREATE FULLTEXT INDEX ON [Contractors] (FullName, TaxIdentityNumber, RelatedOrganizationFullName) KEY INDEX ContractorPK ON SPFTI;