Mahmod Goda
Mahmod Goda

Reputation: 63

Search Arabic Text Contain Any Word SQL Server

I have a problem in Arabic Full Text Search in SQL-Server, I want if the user Search for the word "الجامع تفسير" in search text in asp.net application and hit search button the result get all rows has any word contain "الجامع" or "تفسير" or "جامع" enter image description here

Upvotes: 2

Views: 713

Answers (1)

Harry
Harry

Reputation: 1263

A fulltext index in MS-SQL is kind of dependent on the language the contained text is written in. It tries to find "words" by using "breakers"

As i currently worked with full-text indexes, i know a little about it but unfortunately i dont know at all what your results means (sorry, dont know arabic letters).

Just remember the breakers and also that it only works on words that were identified between the breakers. Maybe this helps:

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/dc1a0efa-301b-425d-aa76-1e34144b18fd/using-full-text-search-with-arabic-and-english-data?forum=sqlsearch

[EDIT] List of language ids: https://learn.microsoft.com/en-us/sql/relational-databases/system-catalog-views/sys-fulltext-languages-transact-sql

Here some example from MS where the language id is specified. https://learn.microsoft.com/en-us/sql/relational-databases/system-catalog-views/sys-fulltext-languages-transact-sql

USE AdventureWorks2012;
GO
CREATE FULLTEXT CATALOG production_catalog;
GO
CREATE FULLTEXT INDEX ON Production.ProductReview
(
ReviewerName
Language 1033,
EmailAddress
Language 1033,
Comments
Language 1033
)
KEY INDEX PK_ProductReview_ProductReviewID
ON production_catalog;
GO

Upvotes: 1

Related Questions