SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Full Text Indexing - Text Parsing Routine


Full Text Indexing - Text Parsing Routine

Author
Message
ckempste
ckempste
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2347 Visits: 1
Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/ckempster/fulltextindexingtextparsingroutine.asp


Chris Kempster
www.chriskempster.com
Author of "SQL Server Backup, Recovery & Troubleshooting"
Author of "SQL Server 2k for the Oracle DBA"
Razvan Socol
Razvan Socol
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1143 Visits: 129
1. How about the following condition:

ISABOUT("drive safe" WEIGHT (.8), "drive" NEAR "safe" WEIGHT (.7),
"drive*" NEAR "safe*" WEIGHT (.6), FORMSOF(INFLECTIONAL,"drive","safe") .5)

Would it be better ?

2. What is the idea with "é type characters" ?

Razvan


Edited by - rsocol on 12/11/2003 12:57:56 AM



ckempste
ckempste
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2347 Visits: 1
Hi there

Very nice indeed, I will alter the routine with a new parameter for this option and see how it goes in test.

Thanks again.

Cheers

Ck

Chris Kempster
www.chriskempster.com
Author of "SQL Server 2k for the Oracle DBA"


Chris Kempster
www.chriskempster.com
Author of "SQL Server Backup, Recovery & Troubleshooting"
Author of "SQL Server 2k for the Oracle DBA"
ckempste
ckempste
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2347 Visits: 1
For those interested, alter the final @search assignment to this:

SELECT @search = 'ISABOUT("' + @rawsearch + '" WEIGHT(.8), ' + @search2 + ' WEIGHT (.7), ' + @search + ' WEIGHT(.6)) OR (' + @fuzzy + ')'

and it will change it to this:

ISABOUT("drive safe" WEIGHT(.8), "drive" near "safe" WEIGHT (.7), "drive*" near "safe*" WEIGHT(.6)) OR (FORMSOF(INFLECTIONAL,"drive") AND FORMSOF(INFLECTIONAL,"safe"))

Note that:

FORMSOF(INFLECTIONAL,"drive","safe")

does an OR, which cant be used in the above statement, only AND between formsof statements.

Cheers

Ck

Chris Kempster
www.chriskempster.com
Author of "SQL Server 2k for the Oracle DBA"


Chris Kempster
www.chriskempster.com
Author of "SQL Server Backup, Recovery & Troubleshooting"
Author of "SQL Server 2k for the Oracle DBA"
ckempste
ckempste
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2347 Visits: 1
With the é (accented characters). No matter the language settings for the character fields (ie. accent insensitive), we found the é and other such characters wouldnt translate, so café wouldnt come up if we searched for cafe for example, this was a real pain to deal with, therefore stripping was required.

If someone has a solution for this, id love to hear it.

Cheers

Ck

Chris Kempster
www.chriskempster.com
Author of "SQL Server 2k for the Oracle DBA"


Chris Kempster
www.chriskempster.com
Author of "SQL Server Backup, Recovery & Troubleshooting"
Author of "SQL Server 2k for the Oracle DBA"
ojm@webf1.com
ojm@webf1.com
SSC Rookie
SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)

Group: General Forum Members
Points: 27 Visits: 1
Very much appreciated. I've not yet done a lot of testing or looked at the logic in detail, however, I did notice something peculiar. If the input parameter is varchar(500), how can the output parameter also be varchar(500)? If I indeed send all 500 characters in, it seems the result coming back would be truncated.

This is just a minor detail, but it could create problem that could be hard to diagnose.



ckempste
ckempste
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2347 Visits: 1
hi there, very observant actually, this is a bug, we altered it just the other day to 2000, the size really blows out for large search strings... thanks again.

Chris Kempster
www.chriskempster.com
Author of "SQL Server 2k for the Oracle DBA"


Chris Kempster
www.chriskempster.com
Author of "SQL Server Backup, Recovery & Troubleshooting"
Author of "SQL Server 2k for the Oracle DBA"
trullock
trullock
Grasshopper
Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)

Group: General Forum Members
Points: 15 Visits: 0
Hi, I really liked this code Smile

I've ported it into C# to give me more control over the search term, I'd love to know what you guys think Smile

Check it out: How to build an SQL full text index search term in c#


Trull
muonlab web development blog
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search