Friday, February 24, 2012

Full-Text search and database view

My understanding from full-text search (with SQL 2000) is that you can only
search a table and not a view; i.e. you cannot create a full-text index for
a view.
1) Is there a way to full-text search a view?
2) If not, what could I be using the search data in the database using a
view which is better (faster) than a "LIKE "?
Thanks...
Denis.
In SQL 2005 you can full text index and search views.
Currently in SQL 2000 you can't full text index views, so you will have to
materialize the view as a table, i.e. create a table which has the same
columns as a view and use replication or triggers to keep this table in sync
with the base table. Then FTI this table.
Hilary Cotter
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
"Denis Blondeau" <denisblondeau@.hotmail.com> wrote in message
news:uaa144dGFHA.400@.TK2MSFTNGP14.phx.gbl...
> My understanding from full-text search (with SQL 2000) is that you can
only
> search a table and not a view; i.e. you cannot create a full-text index
for
> a view.
> 1) Is there a way to full-text search a view?
> 2) If not, what could I be using the search data in the database using a
> view which is better (faster) than a "LIKE "?
> Thanks...
> Denis.
>
|||Denis,
Yes, your understanding is correct for SQL Server 2000.
1) Is there a way to full-text search a view?
A. You cannot FT Index the "contents" of a view, however, you can include
SQL FTS statements such as CONTAINS or FREETEXT in a view.
2) If not, what could I be using the search data in the database using a
view which is better (faster) than a "LIKE "?
A. Depending upon your requirements (and more info on this would be
helpful), and assuming that you want to use FTS to search either multiple
columns or multiple tables & column in one SQL FTS statement, you may want
to checkout "SQL Server FTS across multiple tables or columns" at
http://spaces.msn.com/members/jtkane/Blog/cns!1pWDBCiDX1uvH5ATJmNCVLPQ!316.entry
If you have further questions on how to enhance SQL FTS, feel free to leave
a comment!
Thanks,
John
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/
"Denis Blondeau" <denisblondeau@.hotmail.com> wrote in message
news:uaa144dGFHA.400@.TK2MSFTNGP14.phx.gbl...
> My understanding from full-text search (with SQL 2000) is that you can
only
> search a table and not a view; i.e. you cannot create a full-text index
for
> a view.
> 1) Is there a way to full-text search a view?
> 2) If not, what could I be using the search data in the database using a
> view which is better (faster) than a "LIKE "?
> Thanks...
> Denis.
>
|||Thanks for your help, John (and Hilary)!
"John Kane" <jt-kane@.comcast.net> wrote in message
news:OttF9zhGFHA.2524@.TK2MSFTNGP15.phx.gbl...
> Denis,
> Yes, your understanding is correct for SQL Server 2000.
> 1) Is there a way to full-text search a view?
> A. You cannot FT Index the "contents" of a view, however, you can include
> SQL FTS statements such as CONTAINS or FREETEXT in a view.
> 2) If not, what could I be using the search data in the database using a
> view which is better (faster) than a "LIKE "?
> A. Depending upon your requirements (and more info on this would be
> helpful), and assuming that you want to use FTS to search either multiple
> columns or multiple tables & column in one SQL FTS statement, you may want
> to checkout "SQL Server FTS across multiple tables or columns" at
>
http://spaces.msn.com/members/jtkane/Blog/cns!1pWDBCiDX1uvH5ATJmNCVLPQ!316.entry
> If you have further questions on how to enhance SQL FTS, feel free to
leave
> a comment!
> Thanks,
> John
> --
> SQL Full Text Search Blog
> http://spaces.msn.com/members/jtkane/
>
> "Denis Blondeau" <denisblondeau@.hotmail.com> wrote in message
> news:uaa144dGFHA.400@.TK2MSFTNGP14.phx.gbl...
> only
> for
>

No comments:

Post a Comment