SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 A problem with using full text search with wildcar
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Eran
Starting Member

6 Posts

Posted - 12/02/2012 :  13:33:41  Show Profile  Reply with Quote
Hi,

I have a weird case with the full text search in Sql Server 2008 R2 SP1 web edition.
I have a table that has a row with this value in the indexed field (mapped to a catalog):

logitech wireless keyboard case for ipad eran

When I query like that, I do get this row as expected:
SELECT * FROM TBL_NAME
WHERE CONTAINS (field_name,'"logitech wireless keyboard case for ipad"')

I don't unserstand why when I run the following query, I do not get any result:
SELECT * FROM TBL_NAME
WHERE CONTAINS (field_name,'"logitech wireless keyboard case for ipad*"')

I add the wildcard asterisk after the query phrase, in order to get all the rows that contains the queried phrase,abd that's why I build the string parameter for the CONTAINS query like that:
' + " + the queries string + * + " + '
Isn't that the right way to do that?
And if it is, then why does this row is not returned in this query?

Any advises please?

Thanks!
Eran.

Eran
Starting Member

6 Posts

Posted - 12/03/2012 :  11:51:54  Show Profile  Reply with Quote
My need is to change an old
LIKE 'search text%'
query
to a full text search query in order to improve performence,
while keeping the search results as close as possible to what I got till now with the old LIKE query.

So, if my old store procedure produced this query:

SELECT * FROM TBL_NAME
WHERE FIELD_NAME LIKE 'logitech wireless keyboard case for ipad%'

Is it possible to use a full text search query and get excactly the same results as I got before with the old query?
If it is, what is the correct way to do so? And if it is not possible,
what would give me the closest results (I would rather have more results, not less then before)?


Thanks!
Eran
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000