but I will check again. I will also check if FTS does maybe meet our
Daniel Crichton wrote:
> As Hilary pointed out, MS FTS doesn't work like this. Are you sure SQL Turbo
> isn't supported? Quest Software are still listing it on their current
> products page, and KB articles have been added within at least the past
> month to their site. Have you tried contacting them?
http://www.quest.com >
> Dan
>
> DC wrote on 22 Aug 2006 09:00:10 -0700:
>
> > Yes, something like
> >
> > select top 10 Name, StandardCost
> > from Production.Product
> > where contains(Name, '"Mount*"')
> > order by ListPrice desc
> >
> > does work, the problem is that the FTS will dig up all matching rows
> > first (and in my application there are usually a lot of hits) and then
> > SQL Server will sort there and return the top 10 rows.
> >
> > With SQL Turbo my queries are a lot faster, since I can specify an
> > additional ordering index (which may also reside in a different table)
> > and sort by that index. The SQL Trubo fulltext engine will then only
> > return the top n rows that I have specified.
> >
> > The containstable statement allows a similar functionality, like in
> > Hilary's example:
> >
> > select top 10 Name, StandardCost from Production.Product
> > join (
> > select [key], rank from
> > containstable(Production.Product, Name, '"Mount*"', 1000)
> > ) as k
> > on k.[key]= Production.Product.ProductID
> > order by ListPrice desc
> >
> > The containstable statement will only return the first 1000 rows here,
> > but these will always be sorted by rank. I need this sorted be
> > ListPrice instead. If I do this:
> >
> > select top 10 Name, StandardCost from Production.Product
> > join (
> > select [key], rank from
> > containstable(Production.Product, Name, '"Mount*"', 10)
> > ) as k
> > on k.[key]= Production.Product.ProductID
> > order by ListPrice desc
> >
> > I will not get the 10 matching rows with the highest ListPrice.
> >
> > Daniel Crichton wrote:
> >> DC wrote on 21 Aug 2006 03:17:50 -0700:
> >>
> >>> Hi,
> >>>
> >>> I am currently using the third party product "SQL Turbo" on SQL Server
> >>> 2000 to archive this:
> >>>
> >>> I have a table:
> >>>
> >>> id DocText DocScore
> >>> 1 foo foo 2
> >>> 2 bar bar 1
> >>> ... (approx. 1 mio. entries)
> >>>
> >>> Now with SQL Turbo I can do something like this:
> >>>
> >>> select top 100 id from ExampleTable where contains(DocText, '"foo*")
> >>> order by DocScore desc
> >>>
> >>> (the actual query looks different and relies on a prepared index for
> >>> DocScore).
> >>>
> >>> I require this, since a fulltext search in my application easily
> >>> matches 250,000 documents and I need to efficiently just pull out the
> >>> first few hundreds with the highest scores.
> >>>
> >>> While SQL Turbo works (and its index population speed is incredible) it
> >>> also has some flaws (for example I cannot get the automatical
> >>> population to work) and it looks as if the product is not supported
> >>> anymore.
> >>>
> >>> I looked out for a similar functionality in SQL Server 2005 to no
> >>> avail. Did I overlook something or does somebody maybe know a
> >>> workaround? If possible, I would like to retire SQL Turbo while
> >>> switching to SQL Server 2005.
> >>>
> >>> Regards
> >>> DC
> >>
> >> You can use exactly what you wrote to do your ordering:
> >>
> >> select top 100 id from ExampleTable where contains(DocText, '"foo*")
> >> order by DocScore desc
> >>
> >> I use this form all the time to sort by columns that the FTS has no idea
> >> about.
> >>
> >> Dan