Showing posts with label freetext. Show all posts
Showing posts with label freetext. Show all posts

Friday, February 24, 2012

Fulltext search miss records in select

Running
SELECT productid,productname from productsFullText
where
freetext (*, 'x2000')
or
SELECT productid,productname from productsFullText
where
contains (*, 'x2000')
gives 1 hit.
SELECT productid,productname from productsFullText
where
productname like '%x2000%'
gives 7 hits.
I use the english wordbreaker and the FullIndex is populated with all
ItemCount.
Whats wrong in my setup
--
Regards
Henrik JuelHi, Henrik,
Per my understanding, you got less records from a full-text query than a
regular SQL query with LIKE statement.
If I have misunderstood, please let me know.
For further research, I would like to know:
1. What is your SQL Server version?
2. Has the latest service pack been installed?
If the latest service pack has not been installed on your computer, please
install it first.
If the issue perists, please try rebuilding your full text catalog. You may
refer to:
ALTER FULLTEXT CATALOG (Transact-SQL)
http://msdn2.microsoft.com/en-us/library/ms176095.aspx
Also, I recommend that you check if there are some error informaion in SQL
error logs and Event logs.
Please feel free to let me know if you have any other questions or concerns.
Sincerely yours,
Charles Wang
Microsoft Online Community Support
=====================================================Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
If you are using Outlook Express, please make sure you clear the check box
"Tools/Options/Read: Get 300 headers at a time" to see your reply promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
======================================================When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================|||Hi, Henrik,
I am interested in this issue. Would you mind letting me know the result of
the suggestions? If you need further assistance, feel free to let me know.
Have a good day!
Charles Wang
Microsoft Online Community Support
======================================================When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================|||Thanks for your reply Charles
I found the answer.
The fulltext seachs command FREETEXT will only hit on full words and LIKE %%
can also find a searchtext that is in a word. Thats why I always will get
more hits using the LIKE when performing a search on one searchtext.
rgs Henrik
--
Regards
Henrik Juel
"Charles Wang[MSFT]" wrote:
> Hi, Henrik,
> I am interested in this issue. Would you mind letting me know the result of
> the suggestions? If you need further assistance, feel free to let me know.
>
> Have a good day!
> Charles Wang
> Microsoft Online Community Support
> ======================================================> When responding to posts, please "Reply to Group" via
> your newsreader so that others may learn and benefit
> from this issue.
> ======================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
> ======================================================>|||Hi, Henrik,
Thank you for your reply and the detailed additional feedback on how you
were successful in resolving this issue. This information has been added to
Microsoft's database. Your solution will benefit many other users, and we
really value having you as a Microsoft customer.
If you have any other questions or concerns, please do not hesitate to
contact us. It is always our pleasure to be of assistance.
Have a nice day!
Charles Wang
Microsoft Online Community Support
=====================================================Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
If you are using Outlook Express, please make sure you clear the check box
"Tools/Options/Read: Get 300 headers at a time" to see your reply promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
======================================================When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================

Sunday, February 19, 2012

Full-Text Search -- What Thesaurus does it use?

can't find a full-text search forum .. decided to post it here...

Here's what I find in documentation on FREETEXT

Generates inflectional forms of the words (stemming).
Identifies a list of expansions or replacements for the terms based on matches in the thesaurus.

Question: which thesaurus does it use? Because it definitely doesn't pick up on synonyms from the Office thesaurus..

nevermind... found the expansion/ignore files in
\Microsoft SQL Server\MSSQL.1\MSSQL\FTDATA\

Fulltext Search

Dear Aall,
How can we search for all the key words? Is it possible to write a single
query with Freetext or Contains?
Example: if I search for 'Microsoft has released a new Operating System' I
should get the result which contains all the Key words in the phrase we
search.
Here in this example I should get the result set which contains all the key
words 'Microsoft', 'Released', 'Operating', 'System' in any order by
ignoring the noise words automatically.
Please give us your valid suggetions on this regards..
Thanks in advance
SathianHi Sathian,
Try:
http://www.experts-exchange.com/Dat...members/jtkane/
"Sathian" <sathian.t@.in.bosch.com> wrote in message
news:dg8b86$cbn$1@.ns2.fe.internet.bosch.com...
> Dear Aall,
> How can we search for all the key words? Is it possible to write a single
> query with Freetext or Contains?
> Example: if I search for 'Microsoft has released a new Operating System'
> I
> should get the result which contains all the Key words in the phrase we
> search.
> Here in this example I should get the result set which contains all the
> key
> words 'Microsoft', 'Released', 'Operating', 'System' in any order by
> ignoring the noise words automatically.
> Please give us your valid suggetions on this regards..
>
> Thanks in advance
> Sathian
>

Fulltext Search

Dear Aall,
How can we search for all the key words? Is it possible to write a single
query with Freetext or Contains?
Example: if I search for 'Microsoft has released a new Operating System' I
should get the result which contains all the Key words in the phrase we
search.
Here in this example I should get the result set which contains all the key
words 'Microsoft', 'Released', 'Operating', 'System' in any order by
ignoring the noise words automatically.
Please give us your valid suggetions on this regards..
Thanks in advance
Sathian
Hi Sathian,
Try:
http://www.experts-exchange.com/Data..._20705253.html
The code may not be perfect, but with a bit of modification, you should be
able to get it to work for you to search for all the key words.
Regards,
John
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/
"Sathian" <sathian.t@.in.bosch.com> wrote in message
news:dg8b86$cbn$1@.ns2.fe.internet.bosch.com...
> Dear Aall,
> How can we search for all the key words? Is it possible to write a single
> query with Freetext or Contains?
> Example: if I search for 'Microsoft has released a new Operating System'
> I
> should get the result which contains all the Key words in the phrase we
> search.
> Here in this example I should get the result set which contains all the
> key
> words 'Microsoft', 'Released', 'Operating', 'System' in any order by
> ignoring the noise words automatically.
> Please give us your valid suggetions on this regards..
>
> Thanks in advance
> Sathian
>

Fulltext query not seeming to use "and"

I have the following:
SELECT jobTitle from position where FreeText(jobDescription,'sales and
ccna') order by JobTitle DESC
This gives me 11 hits
If change change the FreeText clause to:
FreeText(jobDescription,'sales')
I get the same 11 hits.
But if I change it to:
FreeText(jobDescription,'ccna')
I get no hits.
I would have thought 'sales and ccna' would also have given me 0 hits.
What am I missing?
Thanks,
Tom
You should use a boolean AND for this with Contains to get what you are
looking for.
select * from Contains(*,'"sales" and "ccna"')
FreeText will ignore the and unless it is removed from the noise word list,
in which case it will search on it. FreeText is a fuzzy search and not
exact. So it will rank rows which contain sales and ccna higher than rows
which contain only ccan or only sales.
..
"tshad" <tscheiderich@.ftsolutions.com> wrote in message
news:upqxO%23aKFHA.1308@.TK2MSFTNGP15.phx.gbl...
>I have the following:
> SELECT jobTitle from position where FreeText(jobDescription,'sales
> and ccna') order by JobTitle DESC
> This gives me 11 hits
> If change change the FreeText clause to:
> FreeText(jobDescription,'sales')
> I get the same 11 hits.
> But if I change it to:
> FreeText(jobDescription,'ccna')
> I get no hits.
> I would have thought 'sales and ccna' would also have given me 0 hits.
> What am I missing?
> Thanks,
> Tom
>
|||"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:OL0z5HbKFHA.436@.TK2MSFTNGP09.phx.gbl...
> You should use a boolean AND for this with Contains to get what you are
> looking for.
> select * from Contains(*,'"sales" and "ccna"')
> FreeText will ignore the and unless it is removed from the noise word
> list, in which case it will search on it. FreeText is a fuzzy search and
> not exact. So it will rank rows which contain sales and ccna higher than
> rows which contain only ccan or only sales.
That was what I was looking for.
BTW you said that FreeText would rank the rows. Can you do that with
Contains? I would like to do this in some cases.
Thanks,
Tom
> .
> "tshad" <tscheiderich@.ftsolutions.com> wrote in message
> news:upqxO%23aKFHA.1308@.TK2MSFTNGP15.phx.gbl...
>
|||actually I made a mistake, both FreeTextTable and ContainsTable will return
a rank value.
Hilary Cotter
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
"tshad" <tscheiderich@.ftsolutions.com> wrote in message
news:O7wTZZbKFHA.3336@.TK2MSFTNGP09.phx.gbl...
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:OL0z5HbKFHA.436@.TK2MSFTNGP09.phx.gbl...
> That was what I was looking for.
> BTW you said that FreeText would rank the rows. Can you do that with
> Contains? I would like to do this in some cases.
> Thanks,
> Tom
>