FullText Catalog Query Builder

Today's post is building a custom query builder for fulltext catalog search (FTS).
When i was (again mentioning) working in a bank, our search feature of web site was developed with asp, visual basic and  com+ side with c#. One year later my new company needed a search feature to a game portal but in this scenario we have full power of ASP.NET so i could developed  it with c#. You can optimize this piece of code to yourself regardless of referencing me : )

Let's begin

step 1
sp_fulltext_database 'enable'

step 2
Create fulltext catalog

step 3
Create Fulltext Index on Tables and Columns

create fulltext index on dbo.titles(title,notes,[type])
Key Index UPKCL_titleidind --unique clustered index

step 4
write a script to test fulltext index on titles

step 5 My Little Token Finder

step 6 TDD Rocks!!(Test functions were written before implemeting SearchStringConverter so i can say TDD, if you follow pictures you can say heyy it's test last :))


Then search Titles with these words
busy "The Gourmet Microwave" "Net Etiquette"

Let's look at the profiler picture below, it explains all the stuff.


Any Question ?

Special thnx Tuna Toksöz

1 yorum:

ulaas dedi ki...

hocam merhaba
linke erisemiyoruz.
varmi bir yolu.....