Re: Quoted literal strings won't force a phrase match

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Ok, I've made some progress on this problem. Apparently SQL Server is
ignoring noise words in my phrase match.

For example, I ran this query :

SELECT *
FROM Content_Items ci
INNER JOIN FREETEXTTABLE(Content_Items, hed, '"time capsule"') AS ft
ON ci.contentItemId = ft.[KEY]
ORDER BY ft.RANK DESC

And it did exactly what it was supposed to do, since neither "time"
nor "capsule" is a noise word.

My impression was that noise words aren't stripped out of a full text
search if the search phrase is a quoted literal. Thus, my search for
"time out" should look for the full phrase "time out", and not just
the word "time."

Does anybody know why SQL Server is removing my noise word from the
phrase match?

On Jan 18, 12:49 pm, Afrobla...@xxxxxxxxx wrote:
Hello all,

From what I've read, SQL Server is supposed to do a phrase match when
you do a full text search that contains quoted literal strings. So,
for example, if I did a full text search on the phrase "time out" and
I put it in quotes, it's supposed to search for the full phrase "time
out" and not just look for rows that contain the words "time" or
"out." However, this isn't working for me.

Here is the query that I'm using :

SELECT *
FROM Content_Items ci
INNER JOIN FREETEXTTABLE(Content_Items, hed, '"time out"') AS ft
ON ci.contentItemId = ft.[KEY]
ORDER BY ft.RANK DESC

What's it's doing is this : it's returning a bunch of rows that have
the words "time" or "out" in the column called hed. It's also
returning rows that have the full phrase "time out", but it's giving
those rows the same rank as rows that only contain the word "time."
In this case, that rank is 180.

Is there anything else I should be doing in my query, or is there some
configuration option I should have turned on?

Thanks.

.



Relevant Pages

  • Re: FTS- not returning results when lines are searched.
    ... It definitely should return results for both a single token or a phrase. ... However in your phrase you have noise words? ... Looking for a FAQ on Indexing Services/SQL FTS ... I am performing full-text-search on a table containing word documents ...
    (microsoft.public.sqlserver.fulltext)
  • Re: Ignored words problem
    ... both freetext and freetexttable can also generate error "A ... clause of the query contained only ignored words". ... >> avoid it either via removing noise words from the specific language ... >> 9952 This is sample text data for Scootney Books, ...
    (microsoft.public.sqlserver.fulltext)
  • Re: Ignored words problem
    ... I agree that the "A clause of the query contained only ignored ... been a pain ever since SQL 7.0 Beta3 was shipped in 1998 and once SQL Server ... sp_configure 'transform noise words' - so you can turn off this check in SQL ... database and searching on 'book' will not return rows that contain 'books': ...
    (microsoft.public.sqlserver.fulltext)
  • Re: noise words, @@ERROR, and stop and resume indexing
    ... double quotes unless it resolves to nothing in which case ... It's not the noise words I have a problem with, ... to make the UDF infallible but as good as I think I've got ... if this query causes an ignored-word error ...
    (microsoft.public.sqlserver.fulltext)
  • Re: Where can I find a list of word breakers?
    ... exec sp_configure 'transtransform noise words', ... Searching for j@xxxxxxx will only hit documents which have foo ... SQL Server Fulltext Team ... Both the query and the database text ...
    (microsoft.public.sqlserver.fulltext)