FTS: Searching across multiple fields 'intelligently'

Posted by Wild Thing on Stack Overflow See other posts from Stack Overflow or by Wild Thing
Published on 2009-12-07T18:08:18Z Indexed on 2010/03/14 4:05 UTC
Read the original article Hit count: 333

Hi,

I have a SP using FTS (Full Text Search). I want searches across multiple fields, 'intelligently' ranking results based on the weights I assign.

Consider a search on a view fetching data from tables: Book, Author and Genre.

Now, I want the searcher to be able to do: "Ludlum Fiction", "Robert Ludlum Bourne", "Bourne Ludlum", etc.

Unfortunately, the only way I have been able to do that at present is this: http://pastebin.com/fdce11ff

This is pretty bad, because I am manually breaking up the search string. I know I am doing this completely the wrong way, but can't figure out the right way to search across multiple fields in FTS. Can somebody help please?

© Stack Overflow or respective owner

Related posts about sql

Related posts about sql-server