I use sql server 2005 and asp.net.
how can I utilize the full text search feature to do what I need?
im not sure how to formulate the queries.
FTS queries are performed based on keywords, so the first thing you would
need to do to go down the FTS route is set up a method of extracting
relevant keywords from posts. If you want to go with FTS, you're basically
looking to automate FTS query formulation. So the first step is to grab all
the relevant keywords out of your posts; then you need to create a full-text
index in the database. After that, creating FTS queries is pretty simple.
With the FREETEXT predicate or FREETEXTTABLE function, for instance, you can
do something like this:
keyword1 OR keyword2 OR keyword3 OR keyword4 ...
The hardest part of the whole exercise would be the initial step of
stripping out relevant keywords which FTS cannot do for you. And there are
some design decisions you'll have to make - for instance, do you want to
store all keywords found in posts in the database or do you want to grab
them dynamically every time the post is displayed? Do you want to determine
which posts are related in a scheduled batch process and store those
results, or will this be performed dynamically at post viewing time also?
This will probably be determined by your requirements--i.e., what's more
important to you: speed, storage efficiency, dynamism/currency of results?
Personally I'd probably go with a method other than FTS for this particular
task, but only because that's not how I normally use it. I'm definitely
interested to find out how well FTS works for you on this.
>I use sql server 2005 and asp.net.
> how can I utilize the full text search feature to do what I need?
[quoted text clipped - 54 lines]
>>>>>>>
>>>>>>> Tem
Tem - 04 Mar 2008 04:34 GMT
I would say speed is most important to me.
I will let know you how well it works.
Thanks
Tem
> FTS queries are performed based on keywords, so the first thing you would
> need to do to go down the FTS route is set up a method of extracting
[quoted text clipped - 80 lines]
>>>>>>>>
>>>>>>>> Tem
Mike C# - 04 Mar 2008 04:44 GMT
Speed being the most important, I'd recommend pre-parsing your keywords out
of the posts and storing them in the database. Then you can extract the
keywords from the database and create FREETEXT predicates using the
keywords. For a bigger speed improvement, you could run the FTS queries in a
regularly scheduled batch and store the results in the database.
>I would say speed is most important to me.
>
[quoted text clipped - 88 lines]
>>>>>>>>>
>>>>>>>>> Tem