Re: FT Search with nois words
From: Marius (marius_at_kanniets.nl)
Date: 10/20/04
- Next message: Daniel Crichton: "Word breakers and "special" characters"
- Previous message: MGBloomfield: "Re: After Full Population, ItemCount = 0"
- In reply to: Kevin Lewis: "Re: FT Search with nois words"
- Next in thread: Hilary Cotter: "Re: FT Search with nois words"
- Reply: Hilary Cotter: "Re: FT Search with nois words"
- Messages sorted by: [ date ] [ thread ]
Date: 20 Oct 2004 02:11:21 -0700
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>...
> 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.com...
> > 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
- Next message: Daniel Crichton: "Word breakers and "special" characters"
- Previous message: MGBloomfield: "Re: After Full Population, ItemCount = 0"
- In reply to: Kevin Lewis: "Re: FT Search with nois words"
- Next in thread: Hilary Cotter: "Re: FT Search with nois words"
- Reply: Hilary Cotter: "Re: FT Search with nois words"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|