2012年3月26日星期一
Full Text Search on Patterns in SQL Server 2005
the middle of a word?
Will
Hi Will,
Since SQL Server 2005 is not released yet, I could recommand you posting
here
http://forums.microsoft.com/msdn/def...orumGroupID=19
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are always here to be of
assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ===
This posting is provided "AS IS" with no warranties, and confers no rights.
Full Text Search on Patterns in SQL Server 2005
the middle of a word?
WillHi Will,
Since SQL Server 2005 is not released yet, I could recommand you posting
here
http://forums.microsoft.com/msdn/de...ForumGroupID=19
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are always here to be of
assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.
Full Text Search on Patterns in SQL Server 2005
the middle of a word?
--
WillHi Will,
Since SQL Server 2005 is not released yet, I could recommand you posting
here
http://forums.microsoft.com/msdn/default.aspx?ForumGroupID=19
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are always here to be of
assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.
Full Text Search of terms including asterisks
I have a document containing the term *sosos
Searching for this with different levels of wildcard placement results as follows:
1 CONTAINS([TargetField] , ' "*sosos"') results in 1 item
2 CONTAINS([TargetField] , ' "*sosos*"') results in 1 item
3 CONTAINS([TargetField] , ' "*soso*"') results in 1 item
4 CONTAINS([TargetField] , ' "*sos*"') results in 1 item
5 CONTAINS([TargetField] , ' "*so*"') results in anything where a term starts with SO
6 CONTAINS([TargetField] , ' "*s*"') results many more where a term starts with S
7 CONTAINS([TargetField] , ' "**"') results in nothing retrieved
Searches 1-4 result in what I would expect. Searches 5-7 do not. Is this a bug or am I missing something?
The * can only be used as a suffix not a prefix.
Have a look at my post
Generally * are treated as noise and so removed that is why you are gettnig the results you are
2012年3月22日星期四
Full text search alternative without leading wildcard limitation
support a leading wildcard in full text searches (i.e., CONTAINS(field,
'*tion')).
To get around this I have been looking at external full text search
engines that might not have this restriction but with little success:
most of the others seem to have the same restriction (e.g., Lucene,
swish-e, etc.). The one that did not was Namazu but it was slow.
So my question is: has anyone found or come up with a full text search
application that does not have this wildcard limitation and is fast
(faster than simply using LIKE)?
google@.macrotex.net wrote on 24 Mar 2006 06:32:06 -0800:
> As has been mentioned several times in this group, SQL Server does not
> support a leading wildcard in full text searches (i.e., CONTAINS(field,
> '*tion')).
> To get around this I have been looking at external full text search
> engines that might not have this restriction but with little success:
> most of the others seem to have the same restriction (e.g., Lucene,
> swish-e, etc.). The one that did not was Namazu but it was slow.
> So my question is: has anyone found or come up with a full text search
> application that does not have this wildcard limitation and is fast
> (faster than simply using LIKE)?
You could, if you have the space in your database, create a copy of the
columns you wish to search in this way in reverse, and use FTS to index
this. eg. add a column called fieldreverse, and do
UPDATE table SET fieldreverse = REVERSE(field)
then index that, and search it using
CONTAINS(field, 'noit*'))
You could automatic the creation of the reversed data using a trigger on the
table for the normal column. Not a pretty solution, but it'll work.
Dan