Monday, March 26, 2012
FT Search with nois words
Is there a way to make it possible to search for the following
searchstring with containstable?
"test AND is"
what i mean is that it will ignore the word "is" but will continu
searching for "test"
thnx in advance,
Marius
Your best bets are to use FreeTextTable or parse the noise words out at the
client. Please find a sample attached.
You could also remove is and other noise words from your noise word list to
get rid of this message.
"Marius" <marius@.kanniets.nl> wrote in message
news:65032a84.0410190111.196b8638@.posting.google.c om...
> Hello,
> Is there a way to make it possible to search for the following
> searchstring with containstable?
> "test AND is"
> what i mean is that it will ignore the word "is" but will continu
> searching for "test"
> thnx in advance,
> Marius
begin 666 searchpage1.htm
M__X\`$@.`5 !-`$P`/@.`-``H`/ !(`$4`00!$`#X`#0`*`#P`4P!4`%D`3 !%
M`" `5 !9`% `10`]`"(`= !E`'@.`= `O`&,`<P!S`"(`/@.`-``H`0@.!/`$0`
M60`@.``D`"0![`&8`;P!N`'0`+0!F`&$`;0!I`&P`>0`Z`%0`8 0!H`&\`;0!A
M`"P`00!R`&D`80!L`"P`<P!A`&X`<P`M`',`90!R`&D`9@.`[` " `9@.!O`&X`
M= `M`',`:0!Z`&4`.@.`Q`# `< !T`'T`#0`*`"X`+@.!H`&4`80!D`&D`;@.!G
M``D`>P!F`&\`;@.!T`"T`9@.!A`&T`:0!L`'D`.@.!4`&$`: !O`&T`80`L`$$`
M<@.!I`&$`; `L`',`80!N`',`+0!S`&4`<@.!I`&8`.P`@.`&8`;P!N`'0`+0!S
M`&D`>@.!E`#H`,0`T`' `= `[`" `9@.!O`&X`= `M`'<`90!I`&<`: !T`#H`
M8@.!O`&P`9 !]``T`"@.`N`"X`8P!I`'0`90`)``D`>P!F`&\`;@.!T`"T`9@.!A
M`&T`:0!L`'D`.@.!4`&$`: !O`&T`80`L`$$`<@.!I`&$`; `L`',`80!N`',`
M+0!S`&4`<@.!I`&8`.P`@.`&8`;P!N`'0`+0!S`&D`>@.!E`#H`. !P`'0`?0`-
M``H`+@.`N`&0`;P!C`'4`;0!E`&X`= `)`'L`9@.!O`&X`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
M`" `5@.!!`$P`50!%`#T`(@.`B`#X`#0`*`#P`20!.`% `50!4`" `5 !9`% `
M10`]`"(`<P!U`&(`;0!I`'0`(@.`@.`$X`00!-`$4`/0`B`&<`;P!"`'4`= !T
M`&\`;@.`B`" `5@.!!`$P`50!%`#T`(@.`@.`%,`90!A`'(`8P!H`" `(@.`@.`&\`
M;@.!C`&P`:0!C`&L`( `]`" `(@.!R`&4`= !U`'(`;@.`@.`&,`: !E`&,`:P!F
M`&\`<@.!M`"@.`= !H`&D`<P`N`&8`;P!R`&T`*0`B`#X`#0`*`#P`:0!N`' `
M=0!T`" `= !Y`' `90`]`"(`: !I`&0`9 !E`&X`(@.`@.`&X`80!M`&4`/0`B
M`&X`80!V`$4`=@.!E`&X`= `B`" `=@.!A`&P`=0!E`#T`(@.!4`&\`< `B`#X`
M#0`*`#P`+P!F`&\`<@.!M`#X`#0`*`#P`8@.!R`#X`#0`*`#P`+ P!H`'0`;0!L
?`#X`#0`*``T`"@.`-``H`#0`*``T`"@.`-``H`#0`*````
`
end
|||SQL Server has a config file that specifies all the noise words it ignores
in full text searches. It is located here:
Program Files\Microsoft SQL Server\MSSQL\FTDATA\SQLServer\Config\noise.eng
I'm not sure of the specifics on how you get SQL Server to recognize an
update to this file.
"Marius" <marius@.kanniets.nl> wrote in message
news:65032a84.0410190111.196b8638@.posting.google.c om...
> Hello,
> Is there a way to make it possible to search for the following
> searchstring with containstable?
> "test AND is"
> what i mean is that it will ignore the word "is" but will continu
> searching for "test"
> thnx in advance,
> Marius
|||But if I empty this file it will no longer ignore the noise words
(right?).
What I want is that the words will be ignored but the query will still
continue searching the database.
Here is the query I use to search:
--Begin
SELECT Total.TopicID,
f.AuthorizationItemID,
ft.TopicTitle,
ft.TopicStatus,
(SELECT MAX(PostDate) FROM ForumPost WHERE TopicID =
Total.TopicID) AS LastPost,
(SELECT COUNT(*) - 1 FROM ForumPost WHERE TopicID =
Total.TopicID) AS NumberOfReplies,
(SELECT UserFirstName + ' ' + UserLastName FROM Users WHERE
UserID = (SELECT UserID FROM ForumPost WHERE TopicID = Total.TopicID
AND PostDate = (SELECT MIN(PostDate) FROM ForumPost WHERE TopicID =
Total.TopicID))) AS Poster,
f.ForumAfk,
f.ForumName,
f.ForumID,
fc.CategoryName,
SUM(Total.Score) AS Score
FROM
(
SELECT fp.TopicID,
SUM(A.RANK) AS Score
FROM CONTAINSTABLE (ForumPost, PostMessage, @.strSearchString) A
JOIN ForumPost fp ON A.[Key] = fp.PostID
GROUP BY fp.TopicID
UNION ALL
SELECT B.[Key] AS TopicID,
B.RANK * 3 AS Score
FROM CONTAINSTABLE (ForumTopic, TopicTitle, @.strSearchString) B
) AS Total
JOIN ForumTopic ft ON Total.TopicID = ft.TopicID
JOIN ForumCategory fc ON ft.CategoryID = fc.CategoryID
JOIN Forum f ON fc.ForumID = f.ForumID
GROUP BY Total.TopicID, f.AuthorizationItemID, ft.TopicTitle,
ft.TopicStatus, ft.CategoryID, f.ForumAfk, f.ForumName, f.ForumID,
fc.CategoryName
ORDER BY Total.Score DESC
--End
The query it self works perfectly as far is I tested. But a
searchstring like 'test AND is' fails. Looking for a string like
'"test is"' does work but then it wil look for that exact string and
that's not the answer i'm looking for.
A option is ofcourse to remove the noise words from the string in my
code so they never end up in the store procedure. But I realy don't
like that solution so I hope there is an other way.
Marius
"Kevin Lewis" <lewis.kevin@.myfloridahouse.com> wrote in message news:<eoyE5eitEHA.4044@.TK2MSFTNGP09.phx.gbl>...[vbcol=seagreen]
> SQL Server has a config file that specifies all the noise words it ignores
> in full text searches. It is located here:
> Program Files\Microsoft SQL Server\MSSQL\FTDATA\SQLServer\Config\noise.eng
> I'm not sure of the specifics on how you get SQL Server to recognize an
> update to this file.
> "Marius" <marius@.kanniets.nl> wrote in message
> news:65032a84.0410190111.196b8638@.posting.google.c om...
|||yes, they will no longer be searched on. Your best bet is to filter them out
at the client.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Marius" <marius@.kanniets.nl> wrote in message
news:65032a84.0410200111.64e78be9@.posting.google.c om...
> But if I empty this file it will no longer ignore the noise words
> (right?).
> What I want is that the words will be ignored but the query will still
> continue searching the database.
> Here is the query I use to search:
> --Begin
> SELECT Total.TopicID,
> f.AuthorizationItemID,
> ft.TopicTitle,
> ft.TopicStatus,
> (SELECT MAX(PostDate) FROM ForumPost WHERE TopicID =
> Total.TopicID) AS LastPost,
> (SELECT COUNT(*) - 1 FROM ForumPost WHERE TopicID =
> Total.TopicID) AS NumberOfReplies,
> (SELECT UserFirstName + ' ' + UserLastName FROM Users WHERE
> UserID = (SELECT UserID FROM ForumPost WHERE TopicID = Total.TopicID
> AND PostDate = (SELECT MIN(PostDate) FROM ForumPost WHERE TopicID =
> Total.TopicID))) AS Poster,
> f.ForumAfk,
> f.ForumName,
> f.ForumID,
> fc.CategoryName,
> SUM(Total.Score) AS Score
> FROM
> (
> SELECT fp.TopicID,
> SUM(A.RANK) AS Score
> FROM CONTAINSTABLE (ForumPost, PostMessage, @.strSearchString) A
> JOIN ForumPost fp ON A.[Key] = fp.PostID
> GROUP BY fp.TopicID
>
> UNION ALL
>
> SELECT B.[Key] AS TopicID,
> B.RANK * 3 AS Score
> FROM CONTAINSTABLE (ForumTopic, TopicTitle, @.strSearchString) B
> ) AS Total
> JOIN ForumTopic ft ON Total.TopicID = ft.TopicID
> JOIN ForumCategory fc ON ft.CategoryID = fc.CategoryID
> JOIN Forum f ON fc.ForumID = f.ForumID
> GROUP BY Total.TopicID, f.AuthorizationItemID, ft.TopicTitle,
> ft.TopicStatus, ft.CategoryID, f.ForumAfk, f.ForumName, f.ForumID,
> fc.CategoryName
> ORDER BY Total.Score DESC
> --End
> The query it self works perfectly as far is I tested. But a
> searchstring like 'test AND is' fails. Looking for a string like
> '"test is"' does work but then it wil look for that exact string and
> that's not the answer i'm looking for.
> A option is ofcourse to remove the noise words from the string in my
> code so they never end up in the store procedure. But I realy don't
> like that solution so I hope there is an other way.
> Marius
> "Kevin Lewis" <lewis.kevin@.myfloridahouse.com> wrote in message
news:<eoyE5eitEHA.4044@.TK2MSFTNGP09.phx.gbl>...[vbcol=seagreen]
ignores[vbcol=seagreen]
Server\MSSQL\FTDATA\SQLServer\Config\noise.eng[vbcol=seagreen]
Monday, March 12, 2012
Frequency Query
on a SQL 7.0 database is it possible to do a query to analyze frequency of the entries in the database?in other words I want to know which entries have the most instances.
Hi,
You can use the count method in combination with a group by clause.
For example: SELECT ProductName, COUNT(*) FROM Orders GROUP BY ProductName
Greetz,
Geert
Geert Verhoeven
Consultant @. Ausy Belgium
My Personal Blog
|||thanks for your reply, the column name in the table is Tagname, would it be possible to count all entries for a specific time period? alarmlog is the table name, eventstamp is the time stamp of the entry.
like this:
select *, count(*)
from alarmlog
where eventstamp > '02/01/2007 00:00:00' and
eventstamp < '02/02/2007 00:00:00
thanks
Gary
|||
Yes but you should do it like this:
select TagName, count(*)
from alarmlog
where eventstamp > '02/01/2007 00:00:00' and eventstamp < '02/02/2007 00:00:00'
group by TagName
FYI: This is a good site with basic SQL syntax: http://www.w3schools.com/sql/default.asp
Greetz,
Geert
Geert Verhoeven
Consultant @. Ausy Belgium
My Personal Blog
|||thanks again.
Gary
|||Sorry one more quick question, for the results can I add another column to appear? there is a comment column for each entry that has the description in it that would be useful in the resluts.
Gary
|||You can add as much columns as you want but the column must be included in the group by clause OR included in an aggregate function like (SUM, AVG, MIN, MAX, COUNT, ...)
Greetz,
Geert
Geert Verhoeven
Consultant @. Ausy Belgium
My Personal Blog
Wednesday, March 7, 2012
FREETEXTTABLE
Hi..
I have used Full-Text Search in a stored procedure with English words whithout any problems..But when i use it with Arabic words it gives me THE Error:
Server: Msg 7619, Level 16, State 1, Procedure SearchProject, Line 19
Execution of a full-text operation failed. A clause of the query contained only ignored words.
The stored procedure :
CREATE PROCEDURE SearchProject
(
@.SearchString nvarchar(500),
@.CultureName nvarchar(50),
@.HowManyResults int OUTPUT
)
AS
CREATE TABLE #SearchTable
(
FieldNO int,
ProjectNO int,
ProjectName nvarchar(200),
ProjectDescription nvarchar(1000),
ProjectImage nvarchar(1000),
CultureID int
)
INSERT INTO #SearchTable (FieldNO,ProjectNO,ProjectName,ProjectDescription,ProjectImage,CultureID)
SELECT P.FieldNO, PL.ProjectNO,PL.ProjectName,PL.ProjectDescription,P.ProjectImage,PL.CultureID
FROM FREETEXTTABLE(Project_Locale,*,@.SearchString) AS FT JOIN Project_Locale AS PL ON FT.[KEY]=PL.ProjectCultureID
JOIN Project AS P ON P.ProjectNO=PL.ProjectNO
WHERE PL.CultureID=dbo.GetCultureID(@.CultureName)
INSERT INTO #SearchTable (FieldNO,ProjectNO,ProjectName,ProjectDescription,ProjectImage,CultureID)
SELECT P.FieldNO, PL.ProjectNO,PL.ProjectName,PL.ProjectDescription,P.ProjectImage,PL.CultureID
FROM Project_Locale AS PL ,Project AS P,
ProjectField_Locale AS FL,
FREETEXTTABLE(ProjectField_Locale,*,@.SearchString) AS FT2
WHERE FL.FieldNO=P.FieldNO
AND FL.FieldCultureID=FT2.[KEY]
AND PL.ProjectNO=P.ProjectNO
AND PL.CultureID=dbo.GetCultureID(@.CultureName)
AND FL.CultureID=dbo.GetCultureID(@.CultureName)
INSERT INTO #SearchTable (FieldNO,ProjectNO,ProjectName,ProjectDescription,ProjectImage,CultureID)
SELECT P.FieldNO, PL.ProjectNO,PL.ProjectName,PL.ProjectDescription,P.ProjectImage,PL.CultureID
FROM Project_Locale AS PL ,Project AS P,
Feature_Locale AS PFEA,
ProjectFeature AS FP,
Feature AS F,
FREETEXTTABLE(Feature_Locale,*,@.SearchString) AS FT3
WHERE FT3.[KEY]=PFEA.FeatureCultureID
AND FP.ProjectNO=P.ProjectNO
AND FP.FeatureNO=PFEA.FeatureNO
AND PL.ProjectNO=P.ProjectNO
AND F.FeatureNO=PFEA.FeatureNO
AND PFEA.CultureID=dbo.GetCultureID(@.CultureName)
AND PL.CultureID=dbo.GetCultureID(@.CultureName)
SELECT @.HowManyResults=COUNT(DISTINCT ProjectNO) FROM #SearchTable
SELECT DISTINCT * FROM #SearchTable
RETURN
GO
I called the stored procedure using the following(in the Query Analayzer) :
USE nabeel1eagle
DECLARE @.HowManyResults int
EXEC SearchProject '?????','ar-SA',@.HowManyResults OUTPUT
but when I use the previous code directly(without calling the stored procedure using EXEC) in the Query Analyzer it works fine.Like the following (part of the code)code:
SELECT P.FieldNO, PL.ProjectNO,PL.ProjectName,PL.ProjectDescription,P.ProjectImage,PL.CultureID
FROM FREETEXTTABLE(Project_Locale,*,'?????') AS FT JOIN Project_Locale AS PL ON FT.[KEY]=PL.ProjectCultureID
JOIN Project AS P ON P.ProjectNO=PL.ProjectNO
WHERE PL.CultureID=dbo.GetCultureID('ar-SA')
Could any one help and tell me how to solve this problem?
http://support.microsoft.com/?kbid=892924
HTH
|||Thank you very much for your respond and important information..I have found a solution for my problem before i view your message..The solution was changing the sql collation and the windows collation.
The Search tool is working fine now in my website:www.engineeringprojects.net.
|||could you provide me the changed code using windows collation and sql collation. plz mail me to ananth.ramasamymeenachi@.cognizant.com|||Sorry for being too late...
The code is the same but you can change the collation visually in the table designer..I dont remember what was the SqlCollation exactlly but the windows Collation was arabic.
FREETEXTTABLE
Hi..
I have used Full-Text Search in a stored procedure with English words whithout any problems..But when i use it with Arabic words it gives me THE Error:
Server: Msg 7619, Level 16, State 1, Procedure SearchProject, Line 19
Execution of a full-text operation failed. A clause of the query contained only ignored words.
The stored procedure :
CREATE PROCEDURE SearchProject
(
@.SearchString nvarchar(500),
@.CultureName nvarchar(50),
@.HowManyResults int OUTPUT
)
AS
CREATE TABLE #SearchTable
(
FieldNO int,
ProjectNO int,
ProjectName nvarchar(200),
ProjectDescription nvarchar(1000),
ProjectImage nvarchar(1000),
CultureID int
)
INSERT INTO #SearchTable (FieldNO,ProjectNO,ProjectName,ProjectDescription,ProjectImage,CultureID)
SELECT P.FieldNO, PL.ProjectNO,PL.ProjectName,PL.ProjectDescription,P.ProjectImage,PL.CultureID
FROM FREETEXTTABLE(Project_Locale,*,@.SearchString) AS FT JOIN Project_Locale AS PL ON FT.[KEY]=PL.ProjectCultureID
JOIN Project AS P ON P.ProjectNO=PL.ProjectNO
WHERE PL.CultureID=dbo.GetCultureID(@.CultureName)
INSERT INTO #SearchTable (FieldNO,ProjectNO,ProjectName,ProjectDescription,ProjectImage,CultureID)
SELECT P.FieldNO, PL.ProjectNO,PL.ProjectName,PL.ProjectDescription,P.ProjectImage,PL.CultureID
FROM Project_Locale AS PL ,Project AS P,
ProjectField_Locale AS FL,
FREETEXTTABLE(ProjectField_Locale,*,@.SearchString) AS FT2
WHERE FL.FieldNO=P.FieldNO
AND FL.FieldCultureID=FT2.[KEY]
AND PL.ProjectNO=P.ProjectNO
AND PL.CultureID=dbo.GetCultureID(@.CultureName)
AND FL.CultureID=dbo.GetCultureID(@.CultureName)
INSERT INTO #SearchTable (FieldNO,ProjectNO,ProjectName,ProjectDescription,ProjectImage,CultureID)
SELECT P.FieldNO, PL.ProjectNO,PL.ProjectName,PL.ProjectDescription,P.ProjectImage,PL.CultureID
FROM Project_Locale AS PL ,Project AS P,
Feature_Locale AS PFEA,
ProjectFeature AS FP,
Feature AS F,
FREETEXTTABLE(Feature_Locale,*,@.SearchString) AS FT3
WHERE FT3.[KEY]=PFEA.FeatureCultureID
AND FP.ProjectNO=P.ProjectNO
AND FP.FeatureNO=PFEA.FeatureNO
AND PL.ProjectNO=P.ProjectNO
AND F.FeatureNO=PFEA.FeatureNO
AND PFEA.CultureID=dbo.GetCultureID(@.CultureName)
AND PL.CultureID=dbo.GetCultureID(@.CultureName)
SELECT @.HowManyResults=COUNT(DISTINCT ProjectNO) FROM #SearchTable
SELECT DISTINCT * FROM #SearchTable
RETURN
GO
I called the stored procedure using the following(in the Query Analayzer) :
USE nabeel1eagle
DECLARE @.HowManyResults int
EXEC SearchProject '?????','ar-SA',@.HowManyResults OUTPUT
but when I use the previous code directly(without calling the stored procedure using EXEC) in the Query Analyzer it works fine.Like the following (part of the code)code:
SELECT P.FieldNO, PL.ProjectNO,PL.ProjectName,PL.ProjectDescription,P.ProjectImage,PL.CultureID
FROM FREETEXTTABLE(Project_Locale,*,'?????') AS FT JOIN Project_Locale AS PL ON FT.[KEY]=PL.ProjectCultureID
JOIN Project AS P ON P.ProjectNO=PL.ProjectNO
WHERE PL.CultureID=dbo.GetCultureID('ar-SA')
Could any one help and tell me how to solve this problem?
http://support.microsoft.com/?kbid=892924
HTH
|||Thank you very much for your respond and important information..I have found a solution for my problem before i view your message..The solution was changing the sql collation and the windows collation.
The Search tool is working fine now in my website:www.engineeringprojects.net.
|||could you provide me the changed code using windows collation and sql collation. plz mail me to ananth.ramasamymeenachi@.cognizant.com|||Sorry for being too late...
The code is the same but you can change the collation visually in the table designer..I dont remember what was the SqlCollation exactlly but the windows Collation was arabic.
FREETEXTTABLE
Hi..
I have used Full-Text Search in a stored procedure with English words whithout any problems..But when i use it with Arabic words it gives me THE Error:
Server: Msg 7619, Level 16, State 1, Procedure SearchProject, Line 19
Execution of a full-text operation failed. A clause of the query contained only ignored words.
The stored procedure :
CREATE PROCEDURE SearchProject
(
@.SearchString nvarchar(500),
@.CultureName nvarchar(50),
@.HowManyResults int OUTPUT
)
AS
CREATE TABLE #SearchTable
(
FieldNO int,
ProjectNO int,
ProjectName nvarchar(200),
ProjectDescription nvarchar(1000),
ProjectImage nvarchar(1000),
CultureID int
)
INSERT INTO #SearchTable (FieldNO,ProjectNO,ProjectName,ProjectDescription,ProjectImage,CultureID)
SELECT P.FieldNO, PL.ProjectNO,PL.ProjectName,PL.ProjectDescription,P.ProjectImage,PL.CultureID
FROM FREETEXTTABLE(Project_Locale,*,@.SearchString) AS FT JOIN Project_Locale AS PL ON FT.[KEY]=PL.ProjectCultureID
JOIN Project AS P ON P.ProjectNO=PL.ProjectNO
WHERE PL.CultureID=dbo.GetCultureID(@.CultureName)
INSERT INTO #SearchTable (FieldNO,ProjectNO,ProjectName,ProjectDescription,ProjectImage,CultureID)
SELECT P.FieldNO, PL.ProjectNO,PL.ProjectName,PL.ProjectDescription,P.ProjectImage,PL.CultureID
FROM Project_Locale AS PL ,Project AS P,
ProjectField_Locale AS FL,
FREETEXTTABLE(ProjectField_Locale,*,@.SearchString) AS FT2
WHERE FL.FieldNO=P.FieldNO
AND FL.FieldCultureID=FT2.[KEY]
AND PL.ProjectNO=P.ProjectNO
AND PL.CultureID=dbo.GetCultureID(@.CultureName)
AND FL.CultureID=dbo.GetCultureID(@.CultureName)
INSERT INTO #SearchTable (FieldNO,ProjectNO,ProjectName,ProjectDescription,ProjectImage,CultureID)
SELECT P.FieldNO, PL.ProjectNO,PL.ProjectName,PL.ProjectDescription,P.ProjectImage,PL.CultureID
FROM Project_Locale AS PL ,Project AS P,
Feature_Locale AS PFEA,
ProjectFeature AS FP,
Feature AS F,
FREETEXTTABLE(Feature_Locale,*,@.SearchString) AS FT3
WHERE FT3.[KEY]=PFEA.FeatureCultureID
AND FP.ProjectNO=P.ProjectNO
AND FP.FeatureNO=PFEA.FeatureNO
AND PL.ProjectNO=P.ProjectNO
AND F.FeatureNO=PFEA.FeatureNO
AND PFEA.CultureID=dbo.GetCultureID(@.CultureName)
AND PL.CultureID=dbo.GetCultureID(@.CultureName)
SELECT @.HowManyResults=COUNT(DISTINCT ProjectNO) FROM #SearchTable
SELECT DISTINCT * FROM #SearchTable
RETURN
GO
I called the stored procedure using the following(in the Query Analayzer) :
USE nabeel1eagle
DECLARE @.HowManyResults int
EXEC SearchProject '?????','ar-SA',@.HowManyResults OUTPUT
but when I use the previous code directly(without calling the stored procedure using EXEC) in the Query Analyzer it works fine.Like the following (part of the code)code:
SELECT P.FieldNO, PL.ProjectNO,PL.ProjectName,PL.ProjectDescription,P.ProjectImage,PL.CultureID
FROM FREETEXTTABLE(Project_Locale,*,'?????') AS FT JOIN Project_Locale AS PL ON FT.[KEY]=PL.ProjectCultureID
JOIN Project AS P ON P.ProjectNO=PL.ProjectNO
WHERE PL.CultureID=dbo.GetCultureID('ar-SA')
Could any one help and tell me how to solve this problem?
http://support.microsoft.com/?kbid=892924
HTH
|||Thank you very much for your respond and important information..I have found a solution for my problem before i view your message..The solution was changing the sql collation and the windows collation.
The Search tool is working fine now in my website:www.engineeringprojects.net.
|||could you provide me the changed code using windows collation and sql collation. plz mail me to ananth.ramasamymeenachi@.cognizant.com|||Sorry for being too late...
The code is the same but you can change the collation visually in the table designer..I dont remember what was the SqlCollation exactlly but the windows Collation was arabic.
FREETEXT results
resulting recordset, how can I show for example 10 words before and 10 words
after the keyword or phrase that was searched upon? If I get 20 resulting
records I think it would be easier for the user to decide which they want to
view. I know Google does this. Is this an SQL issue or ASP issue?
thanks
DECLARE @.SearchString varchar(100)
SET @.SearchString = ' "stress" '
SELECT KEY_TBL.RANK, Title, Body
FROM Articles INNER JOIN
FREETEXTTABLE(Articles,*, @.SearchString) AS KEY_TBL
ON Articles.ID = KEY_TBL.[KEY]
ORDER BY Rank DESC
string handling is more efficiently done on the client level as opposed to
within SQL Server.
"shank" <shank@.tampabay.rr.com> wrote in message
news:Obj%23ddqZEHA.1508@.TK2MSFTNGP09.phx.gbl...
> Using the following query I get my desired results. However, in the
> resulting recordset, how can I show for example 10 words before and 10
words
> after the keyword or phrase that was searched upon? If I get 20 resulting
> records I think it would be easier for the user to decide which they want
to
> view. I know Google does this. Is this an SQL issue or ASP issue?
> thanks
> DECLARE @.SearchString varchar(100)
> SET @.SearchString = ' "stress" '
> SELECT KEY_TBL.RANK, Title, Body
> FROM Articles INNER JOIN
> FREETEXTTABLE(Articles,*, @.SearchString) AS KEY_TBL
> ON Articles.ID = KEY_TBL.[KEY]
> ORDER BY Rank DESC
>
|||Hilary,
While in some cases, client-side process might be better, for example
client-side paging and sorting of results, however, in this case, I must
respectively disagree...
Shank, you can use Substring and PatIndex along with your FREETEXTTABLE
query and get the "Goggle like" results that you have requested.
Specifically, the following SQL FTS query on the pubs table pub_info will
return rows that match the FTS search word (books) and display the near by
words from 20 characters before the searched keyword(books) for a total
length of 100 characters.
SELECT pub_id, SubString(pr_info,PatIndex ('%books%',pr_info)-20,100)
FROM pub_info
WHERE Contains(pr_info, 'books')
Regards,
John
"Hilary Cotter" <hilaryk@.att.net> wrote in message
news:#eM2eLrZEHA.644@.tk2msftngp13.phx.gbl...[vbcol=seagreen]
> string handling is more efficiently done on the client level as opposed to
> within SQL Server.
>
> "shank" <shank@.tampabay.rr.com> wrote in message
> news:Obj%23ddqZEHA.1508@.TK2MSFTNGP09.phx.gbl...
> words
resulting[vbcol=seagreen]
want
> to
>
|||I really don't think so. In fact I know so. You can easily demonstrate this
within vbscript.
In fact I have written and ISAPI extension that does this - and posted it
here. Thinking about doing it within a database is simply not a good choice.
"John Kane" <jt-kane@.comcast.net> wrote in message
news:%2364LxM9ZEHA.2792@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> Hilary,
> While in some cases, client-side process might be better, for example
> client-side paging and sorting of results, however, in this case, I must
> respectively disagree...
> Shank, you can use Substring and PatIndex along with your FREETEXTTABLE
> query and get the "Goggle like" results that you have requested.
> Specifically, the following SQL FTS query on the pubs table pub_info will
> return rows that match the FTS search word (books) and display the near by
> words from 20 characters before the searched keyword(books) for a total
> length of 100 characters.
> SELECT pub_id, SubString(pr_info,PatIndex ('%books%',pr_info)-20,100)
> FROM pub_info
> WHERE Contains(pr_info, 'books')
> Regards,
> John
>
> "Hilary Cotter" <hilaryk@.att.net> wrote in message
> news:#eM2eLrZEHA.644@.tk2msftngp13.phx.gbl...
to
> resulting
> want
>
|||Hi Hilary,
Then I guess we can agree that we disagree <G>, as I did say in " some
cases" and not in all cases, so we can agree, on a case-by-case basis. Are
you saying that in all cases, that all types of "string handling" are "bad"
if handled on the server-side?
Regards,
John
"Hilary Cotter" <hilaryk@.att.net> wrote in message
news:ue$hecFaEHA.2844@.TK2MSFTNGP12.phx.gbl...
> I really don't think so. In fact I know so. You can easily demonstrate
this
> within vbscript.
> In fact I have written and ISAPI extension that does this - and posted it
> here. Thinking about doing it within a database is simply not a good
choice.[vbcol=seagreen]
> "John Kane" <jt-kane@.comcast.net> wrote in message
> news:%2364LxM9ZEHA.2792@.TK2MSFTNGP09.phx.gbl...
will[vbcol=seagreen]
by[vbcol=seagreen]
opposed[vbcol=seagreen]
> to
10
>
Sunday, February 26, 2012
free text search
e.g. i have a list of questions and answers in my database and have the following query for it:
SELECT question, Answer
FROM QuestionsAnswer
WHERE FREETEXT(Question, 'i want to travel around the world and learn about cooking')
so i want to extend the above query so that takes each key word (travel, cooking, learn) to find out how frequently that particular word appears in the question (for ranking purposes).
I know freetexttable does rank results, but they don't seem accurate enough for what i need to do.
HELP!!!i've just been told that freetext does this anyways...
=D|||have u tried search on the web|||You will need:
* A one column list (table) with all unimportant words. For that purpose I used a 20-year-old Commodore 64 text adventure interpreter list.
* A two column list (table) with the important words and the number of total occurences for each word.
You parse your text with space, comma, etc as word seperators and run each word against the first list. If it is not their you search it in the second list. If it is their you increment the occurence counter. If it is not their you add it with an occurence counter=1.
Check your second list from time to time in order to see if you can transfer a word from list 2 to list 1.
Easy, isn't it ?