Re: '%phrase%' search
- From: "Daniel Crichton" <msnews@xxxxxxxxxxxxxxxx>
- Date: Mon, 22 Oct 2007 11:43:45 +0100
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
.
- Follow-Ups:
- Re: '%phrase%' search
- From: Hilary Cotter
- Re: '%phrase%' search
- Prev by Date: Re: Major full-text related problem!
- Next by Date: Re: Using CASE statement in CONTAINS predicate ( For FullText Search)
- Previous by thread: Major full-text related problem!
- Next by thread: Re: '%phrase%' search
- Index(es):
Relevant Pages
|