Re: Return a random 5 records from full text index
- From: "Hilary Cotter" <hilary.cotter@xxxxxxxxx>
- Date: Tue, 23 May 2006 21:11:50 -0400
You might want to partition the table on the fly using indexed views and
full-text index them. Depending on the selectivity of some of the other
columns you create the indexed view on you might be able to get smaller
results set.
Another option is to add a clause to your query, i.e. select * from
containstable(tablename, columnname, '"SARG1" and "SARG2"), but you have to
know in advance what SARG2 will be and how frequently it occurs in your
content.
--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
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
"Simon Sabin" <SimonSabin@xxxxxxxxxxxxxx> wrote in message
news:eY7yqirfGHA.3652@xxxxxxxxxxxxxxxxxxxxxxx
Bit of a teaser how can you achieve this.
Assume a search criteria i.e SQL AND Server
I want to not return the top 5 records but a random 5 records.
You can add anything to the indexed column and you can add anything to the
search, but the random results need to be out of the full results set of
the criteria passed in. The reason I want to do this is to avoid returning
the full resultset to SQL and do the filter there.
Cheers
--
Simon Sabin
SQL Server MVP
http://sqljunkies.com/weblog/simons
.
- References:
- Return a random 5 records from full text index
- From: Simon Sabin
- Return a random 5 records from full text index
- Prev by Date: Re: Return a random 5 records from full text index
- Next by Date: Re: Issues with CHANGE_TRACKING AUTO after initial index population
- Previous by thread: Re: Return a random 5 records from full text index
- Next by thread: Full text indexing and execution plans
- Index(es):
Relevant Pages
|