Re: '%phrase%' search

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



also SQL FTS will throw out the middle character. It knows something is
there, but not what. So it will match on

word!phrase
word$phrase
and
word phrase amoung others.

--
RelevantNoise.com - dedicated to mining blogs for business intelligence.

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
"Daniel Crichton" <msnews@xxxxxxxxxxxxxxxx> wrote in message
news:eLfXthJFIHA.4752@xxxxxxxxxxxxxxxxxxxxxxx
fayna wrote on Mon, 22 Oct 2007 03:12:00 -0700:

Hi,
I'd like to know if it's possible to implement the search
'%word|phrase%'
with full text catalog.
I've tried with "...CONTAINS(FIELD,'"word|phrase"')" but I don't get
the same result as using "... FIELD LIKE '%word|phrase%'".
Full text search is faster than LIKE search but it return less rows.

Thanks

You cannot use a wildcard at the start of a word, only at the end. You can
do the following, for instance

CONTAINS(FIELD,'"word*"')

which will find all words beginning with "word", which would include
"word", "wordy", "worded", "wording", etc.

But you can't use the * at the start of a word.

Also, with a phrase the result may be unexpected because the * applies to
each word in the phrase, so

CONTAINS(FIELD,'"my phrase*"')

willl match with "my phrase", "my phraser", "myer phrase", etc etc

FTS will only ever work like LIKE if you are searching for specific whole
single words or phrases.

--
Dan



.



Relevant Pages

  • Re: Need Full Text Search to behave LIKE %word%
    ... anywhere in the phrase. ... bill (and not words contained anywhere in the phrase. ... I've seen a few posts now saying that it does and it might well be that FTS ... also maintains a reversed index (so example is also stored as elpmaxe and so ...
    (microsoft.public.sqlserver.fulltext)
  • Re: Full text serach on all words
    ... You're welcome, Vani., ... benefit from this discussion and as it is related to FTS. ... > HI John, ... > That phrase is just a sample phrase that is how the requirement is. ...
    (microsoft.public.sqlserver.programming)
  • Re: Full text serach on all words
    ... That phrase is just a sample phrase that is how the requirement is. ... Let me put the question in FTS section as well. ... a multiple word FTS query contained within double quotes. ... >> Regards, ...
    (microsoft.public.sqlserver.programming)
  • Re: help to define a search criteria with FTS
    ... You can't do prefix based searches in SQL FTS. ... your content in reverse and then do wildcard based searches, ... so bcd will expand to a search on bcd and abcd, ...
    (microsoft.public.sqlserver.fulltext)
  • Re: Adding unique tags to associate records
    ... You will have to use underscores for this as SQL FTS does not index ... Looking for a FAQ on Indexing Services/SQL FTS ... > Is there anyway to embed tags that use puctuation into a coulmn of an FTS ... > value using the Contains predicate. ...
    (microsoft.public.sqlserver.fulltext)