John
Wat i basically want is that the if my query returns 100 records all should
be ranked from 1- 100 , i want to make sure that rank would always be 1-100..
and at the same time i want to be able to rank the results of differnt
queries ....so max thing will not work with me
if the max rank for one query is 40 and if a record has a rank = 39
and another query returns max rank 144 and one record has rank 60
if i use max method .. it rank for 39 would be greater than the rank for 60
.....
Is not there any other way to restrict sql server to never generate ranks
beyond 100....
or any other work around for it ...??
[quoted text, click to view] "John Kane" wrote:
> Nargis,
> I'm not exactly sure what you're trying to achieve. Could you provide a more
> specific example? If you had a FTS query that returns 100 rows, would you
> want the rank for each row to be 1 - 100? If not, how would you group the
> ranking results on a per query basis? You should also review the paragraph
> in the SQL Server 2000 BOL title "Full-Text Search Recommendations" that
> starts with "What is RANK and how is it determined when used with
> CONTAINSTABLE and FREETEXTTABLE predicates? "
>
> More detailed info is always helpful in understanding your question/request
> so we can better answer your question/request.
> Thanks,
> John
>
>
> "Nargis" <Nargis @discussions.microsoft.com> wrote in message
> news:66964FEE-14CD-4E90-9BAC-75AB90B76527@microsoft.com...
> > Hello,
> > i m using full text search .. but the problem is i want to present the
> > result with very few results with the rank ... the rank as generated by
> the
> > sql full text is only usefull when compared with the other ranks .. i want
> to
> > scale it from 1 to 100.. any ideas on how to do this ...
> >
>
>
Can you try the query I supplied again. It does the ordering and the
normilization you are looking for.
make sure you don't forget the final order by rank desc.
--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html [quoted text, click to view] "Nargis" <Nargis@discussions.microsoft.com> wrote in message
news:96C73A04-0A60-477D-8866-8EDFA83D9973@microsoft.com...
> John
> Wat i basically want is that the if my query returns 100 records all
should
> be ranked from 1- 100 , i want to make sure that rank would always be
1-100..
> and at the same time i want to be able to rank the results of differnt
> queries ....so max thing will not work with me
> if the max rank for one query is 40 and if a record has a rank = 39
> and another query returns max rank 144 and one record has rank 60
>
> if i use max method .. it rank for 39 would be greater than the rank for
60
> ....
> Is not there any other way to restrict sql server to never generate ranks
> beyond 100....
> or any other work around for it ...??
>
> "John Kane" wrote:
>
> > Nargis,
> > I'm not exactly sure what you're trying to achieve. Could you provide a
more
> > specific example? If you had a FTS query that returns 100 rows, would
you
> > want the rank for each row to be 1 - 100? If not, how would you group
the
> > ranking results on a per query basis? You should also review the
paragraph
> > in the SQL Server 2000 BOL title "Full-Text Search Recommendations" that
> > starts with "What is RANK and how is it determined when used with
> > CONTAINSTABLE and FREETEXTTABLE predicates? "
> >
> > More detailed info is always helpful in understanding your
question/request
> > so we can better answer your question/request.
> > Thanks,
> > John
> >
> >
> > "Nargis" <Nargis @discussions.microsoft.com> wrote in message
> > news:66964FEE-14CD-4E90-9BAC-75AB90B76527@microsoft.com...
> > > Hello,
> > > i m using full text search .. but the problem is i want to present the
> > > result with very few results with the rank ... the rank as generated
by
> > the
> > > sql full text is only usefull when compared with the other ranks .. i
want
> > to
> > > scale it from 1 to 100.. any ideas on how to do this ...
> > >
> >
> >
> >
Nargis,
What you may want to do is setup a method for "Rank Assignment" via
importing your CONTAINSTABLE or FREETEXTTABLE query results into a temp
table (with order by RANK) and along with a new column "AssignedRank" and
then starting at 100 assign each row a decreasing AssignedRank value and
then return this value to the user as the "rank" values. You can use a
Top_N_Rank value of 100 to limit the results to 100 rows.
If this is not what you're looking for, could you provide a more specific
example with the query results you expect?
Thanks,
John
[quoted text, click to view] "Nargis" <Nargis@discussions.microsoft.com> wrote in message
news:96C73A04-0A60-477D-8866-8EDFA83D9973@microsoft.com...
> John
> Wat i basically want is that the if my query returns 100 records all
should
> be ranked from 1- 100 , i want to make sure that rank would always be
1-100..
> and at the same time i want to be able to rank the results of differnt
> queries ....so max thing will not work with me
> if the max rank for one query is 40 and if a record has a rank = 39
> and another query returns max rank 144 and one record has rank 60
>
> if i use max method .. it rank for 39 would be greater than the rank for
60
> ....
> Is not there any other way to restrict sql server to never generate ranks
> beyond 100....
> or any other work around for it ...??
>
> "John Kane" wrote:
>
> > Nargis,
> > I'm not exactly sure what you're trying to achieve. Could you provide a
more
> > specific example? If you had a FTS query that returns 100 rows, would
you
> > want the rank for each row to be 1 - 100? If not, how would you group
the
> > ranking results on a per query basis? You should also review the
paragraph
> > in the SQL Server 2000 BOL title "Full-Text Search Recommendations" that
> > starts with "What is RANK and how is it determined when used with
> > CONTAINSTABLE and FREETEXTTABLE predicates? "
> >
> > More detailed info is always helpful in understanding your
question/request
> > so we can better answer your question/request.
> > Thanks,
> > John
> >
> >
> > "Nargis" <Nargis @discussions.microsoft.com> wrote in message
> > news:66964FEE-14CD-4E90-9BAC-75AB90B76527@microsoft.com...
> > > Hello,
> > > i m using full text search .. but the problem is i want to present the
> > > result with very few results with the rank ... the rank as generated
by
> > the
> > > sql full text is only usefull when compared with the other ranks .. i
want
> > to
> > > scale it from 1 to 100.. any ideas on how to do this ...
> > >
> >
> >
> >