Re: Inconsistent Search Results

From: John Kane (jt-kane_at_comcast.net)
Date: 10/22/04


Date: Fri, 22 Oct 2004 11:22:12 -0700

Warren,
Thank you for the info! You're using SQL Server 2000 SP3 on Windows Server
2003 (Win2003) with US_english (1033) both the default language as well as
the "Language for Word Breaker" for your FT-enable varchar columns.

Since you're using Win2003 and it's new wordbreaker dll (LangWrbk.dll), the
string "L''Avenue De La Reine Elizabeth The Second" (without the double
quotes) breaks as follows:

Original text: 'L''Avenue De La Reine Elizabeth The Second'
IWordSink::PutWord: cwcSrcLen 9, cwcSrcPos 0, cwc 9, 'L''Avenue'
IWordSink::PutWord: cwcSrcLen 2, cwcSrcPos 10, cwc 2, 'De'
IWordSink::PutWord: cwcSrcLen 2, cwcSrcPos 13, cwc 2, 'La'
IWordSink::PutWord: cwcSrcLen 5, cwcSrcPos 16, cwc 5, 'Reine'
IWordSink::PutWord: cwcSrcLen 9, cwcSrcPos 22, cwc 9, 'Elizabeth'
IWordSink::PutWord: cwcSrcLen 3, cwcSrcPos 32, cwc 3, 'The'
IWordSink::PutWord: cwcSrcLen 6, cwcSrcPos 36, cwc 6, 'Second'

When you pass the above string into the @searchstreet variable are you also
passing in double quotes (" ")? This would indicate to SQL Server 2000 that
this is a phrase query. Additionally, if you search only on "Avenue De La
Reine Elizabeth The Second" (with the double quotes) do you get a hit on
this? Note, there is no word limit of any sort on full text search queries,
but there are issues with punctuation characters (such as single quotes that
are escaped) that depend upon the OS-supplied wordbreaker dll.

Thanks,
John

"Wal" <Wal@discussions.microsoft.com> wrote in message
news:C6D8715A-9C48-4CA5-87B2-3C551A77859D@microsoft.com...
> Sorry John - here is the relevenat bit of the SQL Statement -
@searchStreet
> is the parameter in question...
> where (
> contains (d.*, @searchtext1)
> or d.business like @Business+'%'
> or contains( b.*, @searchtext1)
> or b.name like @Business+'%'
> or contains( r1.*, @searchtext1)
> or r1.name like @Business+'%'
> or contains( r2.*, @searchtext1)
> or d.NameOfTerrace like @Business+'%'
> or d.postcode like @Business+'%'
> or d.locality like @searchtext2+'%')
> and contains(r2.* ,@searchstreet) and contains(p.*,@searchTown)
>
> "John Kane" wrote:
>
> > Warren,
> > Could you post the full output of the following SQL script as it is
helpful
> > info in troubleshooting SQL FTS issues?
> >
> > 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
> >
> > Are you using CONTAINS or FREETEXT when you searched for 'L''Avenue De
La
> > Reine Elizabeth The Second'? Could you post the exact SQL query that you
> > were using?
> >
> > Thanks,
> > John
> >
> >
> > "WalrusWal" <WalrusWal@discussions.microsoft.com> wrote in message
> > news:D6020947-4BD9-4C0E-A7B2-9B157213E242@microsoft.com...
> > > When searching for this street using this parameter:
> > > 'L''Avenue De La Reine Elizabeth'
> > >
> > > I get a result ( The record contains 'L''Avenue De La Reine Elizabeth
The
> > > Second',)
> > >
> > > but When I try searching for the whole thing, it won't return any
rows,
> > nor
> > > will it for
> > >
> > > 'L''Avenue De La Reine Elizabeth The'.
> > > Is there a word limit of some sort on full text search?
> > >
> > > Can anyone throw some light on this?
> > >
> > > Thanks In advance
> > >
> > > Warren
> > >
> > >
> >
> >
> >



Relevant Pages

  • Bad data
    ... I am creating a DTS process that will extract data from a ... text file and place it into sql server. ... double quotes must be off, because when I try to tell sql ...
    (microsoft.public.sqlserver.dts)
  • Re: sql injection and php
    ... Some developers have seen samples on illegal login using "' --" (quote ... rid of those dashes (SQL comments). ... SQL Server), the quotes only have a special meaning inside a string ...
    (Vuln-Dev)
  • Re: MS SQL dealing with duplicate columns in rows?
    ... Please, no double quotes for string constants, use single quotes. ... SQL Standard and supported by MS SQL Server. ... Database development questions? ...
    (comp.databases.ms-sqlserver)
  • Re: Access 2007->SQL Server2005 "connection was forcibly closed",G
    ... I moved every table I was able to move to the SQL ... closed connections - but all of these errors are in the version which used ... the SQL Server 2000 and everything worked ... communication between ODBC (OLEDB and Native Client, ...
    (microsoft.public.sqlserver.connect)
  • Re: Unable to Apply SP4 to SQL 2000 Cluster (new Node)
    ... Rebuild the node in the failover cluster. ... Scenario 1" in SQL Server 2000 Books Online. ... This setup process updates to SP4 only the binaries on the new ...
    (microsoft.public.sqlserver.clustering)

Quantcast