Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-01-23 : 18:33:40
|
Steve writes "I am using a full text query to build a search engine on my site using the following syntax:
strSQL = "SELECT DISTINCT CAST((ftt.Rank/10) as integer) AS rank, cci.cci_catID, cci.cci_scatID, c.id, c.title, w.lastName, w.firstName, CAST(c.summary as varchar(1000)) as summary FROM content AS c INNER JOIN FREETEXTTABLE(content, content, '" & searchQuery & "') AS ftt ON ftt.[key] = c.id INNER JOIN contentChannelIndex as cci ON cci.cci_contentid = c.id INNER JOIN writers as w ON w.id = c.authorID WHERE c.publish <> 0 AND c.status <> 0 AND c.publishDate <= getDate() AND (c.expirationDate > getDate() OR c.expirationDate IS NULL) AND cci_scatID IN (1,3,4,5,6,7,8,9,10,11) AND cci_catID IN (1,2,3,4,5,6) ORDER BY rank DESC"
The problem I am facing is that if you look closely, the content table is indexed to a table called contentChannelIndex which tells my content display pages how to display the type of content and show relevent pieces of content. Some pieces of content have multiple entries here and that is necessary. What I need to do is just return one instance of the content." |
|
|
|
|
|
|
|