Groups | Blog | Home
all groups > sql server full text search > may 2005 >

sql server full text search : FTS Multiple tables and columns. Different spin. Help!



woody
5/19/2005 10:54:14 PM
Been reading thru all the posts and KB's on dealing with searching
across multiple columns. Most examples indicate you know what you're
looking for in each column.

Here's my big problem:

A: I have 12 tables, each with multiple columns that need to be
searched.

B: User will enter a search condition in any or all the boxes below

1 - "All these words"
2 - "Exact phrase"
3 - "Any of these words"

Unlike the SP3 "fix", if they enter "house cat" in "all these words", I
want a match if "house" and "cat" are in different tables.

In a nutshell, I need to take the 3 inputs, and search across all the
tables, and get ranked results.

The only answer I see, which seems to be kludge, is to create another
table with one column that concats all the indexable columns for all
the tables.

Doing a monster union with multiple contains/free/??? on each select
seems really ugly and would kill performance.

Am I missing the boat, or does anyone have a better solution?

All comments are REALLY appreciated, as I just pulled out the last hair
on my head!

Thanks.
Hilary Cotter
5/20/2005 12:26:21 PM
My approach would be to consolidate all of your data into a single table. I
realize it doesn't help much.

--
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
[quoted text, click to view]

woody
5/20/2005 10:33:46 PM
Thanks for the input. Don't believe even a single table would do it
since the data would reside in multiple columns, and any/all search
words could be in any of the columns.

But since there really isn't that much data (most columns are like
author, title...), I'll probably take the approach of slapping all in a
single column. Kind of tastes bad, but not talking about too many rows
(15000ish), and it would make life a lot easier.

fyi, the faq link you provided cleared some things up. Thanks!
Hilary Cotter
5/21/2005 12:00:00 AM
Freetext allows you to look across columns, contains does not.

--
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
[quoted text, click to view]

AddThis Social Bookmark Button