Re: '%phrase%' search

Tech-Archive recommends: Fix windows errors by optimizing your registry



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: Using VBA to replace text
    ... single words. ... and the needed replacement. ... Does PP or the find/replace not allow me to replace a phrase? ...
    (microsoft.public.powerpoint)
  • Re: Connies?
    ... I may have to borrow that phrase from you. ... Dan ... Reminds me of a saying from college about killing a buzz..... ...
    (alt.smokers.cigars)
  • Re: NBC what phrases to retire?
    ... Dan wrote: ... Please stop saying that, Joe. ... You HAVE been using that phrase a lot in your posts as of late in other threads, and I am all for retiring it. ...
    (rec.music.artists.springsteen)
  • Re: OT - Stella
    ... dan wrote: ... That last phrase is ... No doubt fixing the current ... problems which encourage the lawsuit lottery will lead to different ...
    (alt.machines.cnc)
  • Re: Not entyrely OT:
    ... Dan L wrote: ... They will be going on my website as soon as I learn ... she uttered the not oft heard phrase "hmm, ...
    (uk.rec.motorcycles)