Re: CONTAINS, phrases and keywords
- From: Simon Sabin <SimonSabin@xxxxxxxxxxxxxxx>
- Date: Mon, 8 Jan 2007 22:21:55 +0000 (UTC)
Hello ddaiker,
OR is an ignored word, what happens is that the ignored word gets replaced by a token
so your search becomes "two ? three", similarly for the document and is an ignored word, your search will only find a record where two and three appear and are seperated by 1 ignored word.
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
I'm getting some results from a CONTAINS query that I find odd. Here
is MyTable:
ID TheText
------------------------
1 two AND three
2 two three
and here is the query that I find odd:
SELECT * FROM MyTable WHERE CONTAINS(*, '"two OR three"')
that's a single quote followed by a double quote and then the reverse
at the end:
It returns row 1 but not row 2 in the results.
The only way I can explain why row 1 is being returned is if SQL is
throwing out both the AND in the data and the OR in the query. But if
that is the case why isn't row 2 being returned?
Anybody have any idea what's going on?
.
- References:
- CONTAINS, phrases and keywords
- From: ddaiker
- CONTAINS, phrases and keywords
- Prev by Date: CONTAINS, phrases and keywords
- Next by Date: SQL2005 fulltext backup
- Previous by thread: CONTAINS, phrases and keywords
- Next by thread: SQL2005 fulltext backup
- Index(es):
Relevant Pages
|
Loading