Discussion:
Arabic Search with Index Service & ASP.NET Problem
(too old to reply)
m***@gmail.com
2007-02-10 08:26:57 UTC
Permalink
Hello,

I am using Index Service with ASP.NET. The code is working fine and
returns the expected results when searching for English words. I got
the same results from my ASP.net search page and in "query the
catalog" in the Index Service mmc. I am searching for words contained
in the meta tags in ASP.Net pages.

When i began to search for Arabic words, also contained in meta tags,
I got an error message "The query contained only ignored words" in
"query the catalog" in the Index Service mmc. I made search for this
error, and i found the solution to download Microsoft Arabic Word
Breaker, and i made the required changes to Regional settings. Now
Searching for Arabic words in "query the catalog" in the Index Service
mmc is working fine and returns the expected results, but ASP.NET
Search page still not working with Arabic and gives me the same error
"The query contained only ignored words"?!!

I don't know what to do, and i don't know where is the error exactly?
Is there anyway to tell the query to use Arabic character set?!

'create a connection object and command object, to connect the Index
Server
Dim odbSearch As OleDbConnection = New
OleDbConnection("Provider=""MSIDXS"";Data Source=""custom"";")

Dim cmdSearch As OleDbCommand = New OleDbCommand
'assign connection to command object cmdSearch
cmdSearch.Connection = odbSearch

'Query to search a free text string in the catalog in the
contents of the indexed documents in the catalog
Dim searchText As String = txtSearch.Text.Replace("'", "''")
cmdSearch.CommandText = "select doctitle, filename, vpath,
rank, characterization from custom..scope() where FREETEXT(Contents,
'" & searchText & "') order by rank desc "

odbSearch.Open()
'Try
'execute search query
Dim rdrSearch As OleDbDataReader = cmdSearch.ExecuteReader()
' <<The error

Thank you in advance.
Best Regards,
Mohamed Salah
MCAD, MCSD. NET
Hilary Cotter
2007-02-10 12:55:31 UTC
Permalink
You need to set the culture for Arabic in your web.config file.
--
Hilary Cotter

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
Post by m***@gmail.com
Hello,
I am using Index Service with ASP.NET. The code is working fine and
returns the expected results when searching for English words. I got
the same results from my ASP.net search page and in "query the
catalog" in the Index Service mmc. I am searching for words contained
in the meta tags in ASP.Net pages.
When i began to search for Arabic words, also contained in meta tags,
I got an error message "The query contained only ignored words" in
"query the catalog" in the Index Service mmc. I made search for this
error, and i found the solution to download Microsoft Arabic Word
Breaker, and i made the required changes to Regional settings. Now
Searching for Arabic words in "query the catalog" in the Index Service
mmc is working fine and returns the expected results, but ASP.NET
Search page still not working with Arabic and gives me the same error
"The query contained only ignored words"?!!
I don't know what to do, and i don't know where is the error exactly?
Is there anyway to tell the query to use Arabic character set?!
'create a connection object and command object, to connect the Index
Server
Dim odbSearch As OleDbConnection = New
OleDbConnection("Provider=""MSIDXS"";Data Source=""custom"";")
Dim cmdSearch As OleDbCommand = New OleDbCommand
'assign connection to command object cmdSearch
cmdSearch.Connection = odbSearch
'Query to search a free text string in the catalog in the
contents of the indexed documents in the catalog
Dim searchText As String = txtSearch.Text.Replace("'", "''")
cmdSearch.CommandText = "select doctitle, filename, vpath,
rank, characterization from custom..scope() where FREETEXT(Contents,
'" & searchText & "') order by rank desc "
odbSearch.Open()
'Try
'execute search query
Dim rdrSearch As OleDbDataReader = cmdSearch.ExecuteReader()
' <<The error
Thank you in advance.
Best Regards,
Mohamed Salah
MCAD, MCSD. NET
m***@gmail.com
2007-02-11 06:29:51 UTC
Permalink
Thank you very much for your reply.
I tried all the different parameters for culture, MS.locale, and
encoding. But all of these didn't give me the solution, However, i
found the solution from one of your previous replies. The solution is
to add --Locale Identifier-- to the OLEDB connection string!!
to be like this (For Arabic):
Dim odbSearch As OleDbConnection = New
OleDbConnection("Provider=MSIDXS;Data Source=custom;Locale
Identifier=1025")

That was the problem, Thank you very much.
Best Regards,

Mohamed Salah

Loading...