Hi all,
i encounter a problem
does full-text search support exactly match ?
in my case, need to search "John David" by exactly match criteria
means all record which contain "john david" need to display `
how can i dp this criteria by using full-text
Try contains, i.e.
select * From tablename where contains(*,'"John David"')
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
"Q" <q@.q.com> wrote in message news:ewdscZ8dFHA.220@.TK2MSFTNGP12.phx.gbl...
> Hi all,
> i encounter a problem
> does full-text search support exactly match ?
> in my case, need to search "John David" by exactly match criteria
> means all record which contain "john david" need to display `
> how can i dp this criteria by using full-text
>
|||but i try this
it will search all words like
John DavidHandson
John David Glory
John David
i jz want to search "John David"
Thanks!
"Hilary Cotter" <hilary.cotter@.gmail.com> glsD:u5eYjf9dFHA.2584@.tk2msftngp13.phx.g bl...
> Try contains, i.e.
> select * From tablename where contains(*,'"John David"')
> --
> 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
> "Q" <q@.q.com> wrote in message
> news:ewdscZ8dFHA.220@.TK2MSFTNGP12.phx.gbl...
>
|||Q,
Could you post the full output of the below SQL code? Not only the SQL
Server version, but the OS platform (Win2K vs. Win2003) as well as the
"Language for Word Breaker" setting for the FT-enabled column are involved.
use <your_database_name_here>
go
SELECT @.@.language
SELECT @.@.version
sp_configure 'default full-text language'
EXEC sp_help_fulltext_catalogs
EXEC sp_help_fulltext_tables
EXEC sp_help_fulltext_columns
EXEC sp_help <your_FT-enable_table_name_here>
go
Additionally, and depending upon the OS platform you have SQL Server
installed on the actual text & punctuation that is in contact with the
search phrase matters as well. Could you also post the exact SQL FTS
(contains or freetext) statement along with the exact strings in the
FT-enable column that you expect to have returned?
BTW, contains(*,'"John David"') should only return rows that contain:
John David Glory
John David
If you want to exclude "Glory" you will need to add a and NOT
contains(*,'"Glory"') clause.
Thanks,
John
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/
"Q" <q@.q.com> wrote in message news:OY6XR4FeFHA.796@.TK2MSFTNGP09.phx.gbl...
> but i try this
> it will search all words like
> John DavidHandson
> i jz want to search "John David"
> Thanks!
> "Hilary Cotter" <hilary.cotter@.gmail.com>
glsD:u5eYjf9dFHA.2584@.tk2msftngp13.phx.g bl...
>
|||if you are interested in only getting hits to John David and not John David
Glory or John DavidHandson, query like this
select * from TableName where contains(*,'"john david" and not "john david
glory"')
You will need to know in advance what you do not wish to appear in your
search results.
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
"Q" <q@.q.com> wrote in message news:OY6XR4FeFHA.796@.TK2MSFTNGP09.phx.gbl...
> but i try this
> it will search all words like
> John DavidHandson
> John David Glory
> John David
> i jz want to search "John David"
> Thanks!
> "Hilary Cotter" <hilary.cotter@.gmail.com>
glsD:u5eYjf9dFHA.2584@.tk2msftngp13.phx.g bl...
>
No comments:
Post a Comment