few confusing things about Full-Text Search queries

hi

I=92ve started learning FULL-TEXT Search queries ( using Sql server
2008 ) and I did try  to find  the answers to my questions by running
various queries and see how they behave, but then not even the
simplest of queries returned the results I=92ve expected, so=85


1)

From Msdn:
=93<simple_term>  - Specifies a match for an exact word or a phrase.
Examples of valid simple terms are "blue berry", blueberry, and
"Microsoft SQL Server". Phrases should be enclosed in double quotation
marks (""). Words in a phrase must appear in the same order as
specified in <contains_search_condition> as they appear in the
database column.=94

a)
SELECT *
FROM fullText
WHERE CONTAINS
(
  *, ' "life at its" '
)

If the above quote is correct, then I assume =93its=94 and =93at=94 are noi=
se
words, since the  above query also returns rows where strings don=92t
contain words =93at=94 and =93its=94?!

b) But then if =93at=94 and =93its=94 are noise words, then the following
query should also return a row containing a string =94life at its
start=94, but it doesn=92t:

SELECT *
FROM fullText
WHERE CONTAINS
(
  *, ' "life start" '
)


2)

a) Word =93start=94 is a synonym for  a word =93begin=94, =93metal=94 is sy=
nonym
for =93steel=94 and similarly =93sisters=94 is synonym for =93siblings=94. =
Thus
the following queries ( due to performing thesaurus search ) should
return rows containing words =93start=94, =93metal=94 or
=93sisters=94,respectively, but they don=92t:

SELECT *
FROM fullText
WHERE FREETEXT ( *, 'begin' )

SELECT *
FROM fullText
WHERE CONTAINS
(
  *, N'FORMSOF( THESAURUS, "metal" ) '
)


SELECT *
FROM fullText
WHERE CONTAINS
(
  *, N'FORMSOF( THESAURUS, "siblings" ) '
)


b)
=93FullText will break out the search string into its individual words,
if there is more than one word. For each word, it generates the
inflectional forms of the word, then identifies a list of matches for
each word based on the thesaurus. FormsOf(Thesaurus=85 on the other hand
just uses the thesaurus to do the search, without going through the
inflectional step.=94

So according to the above text, the  FORMSOF(INFLECTIONAL=85) should
also search for thesaurus synonyms and thus won=92t just search for
inflectional forms of the word?


3) I assume that FREETEXT will by default search for rows that contain
any of the words specified in freetext_string( assuming freetext
_string is enclosed in single quotes ).Thus, if a row only contains a
word =93surf=94, row will still get returned):

SELECT *
FROM fullText
WHERE FREETEXT( *, 'surf sister' )



4)
From Msdn:
=93If freetext_string is enclosed in double quotation marks, a phrase
match is instead performed; stemming and thesaurus are not performed.=94

According to the above quote the following query shouldn=92t return rows
containing strings =93surfing=94 ( due to query not performing stemming ),
=93surf=94 ( due to query performing phrase matching and not individual
word matching ) or =93surfing with suzy=92s sister=94 ( due to query not
performing stemming and due to query performing phrase matching and
not word matching ), but it does.
Thus, it appears that even when freetext_string is enclosed in double
quotation marks, stemming is still preformed, while phrase matching is
not:

SELECT *
FROM fullText
WHERE FREETEXT( *, ' "surf sister" ' )


5) I know FULLTEXT can uses word thesaurus, but does it also use
phrase thesaurus? Thus, it doesn=92t just search for word synonyms, but
also for phrase synonyms?


thanx
0
trubar
5/21/2010 8:23:41 PM
sqlserver.programming 1873 articles. 0 followers. Follow

1 Replies
697 Views

Similar Articles

[PageSpeed] 26

Never mind about my second question. I assumed thesaurus file was
already filled with synonyms, but as it turned out it's empty and
instead we have to fill it manually.
0
trubar
5/22/2010 11:03:00 PM
Reply:

Similar Artilces:

Open- Credit Memo- my credit memo is full applied
My Credit memo is full applied, but when i watched the windows Payables transaction inquiry - vendor. That credit memo in the origin field show me: open. ...

New child DC, "rpc server is unavailable" when doing "Exchangey" things.
Hello chaps/ladies, A bit of advice if you will.... Current scenario..... Forest Domain: name.com (Windows 2003 based) Exchange 2003 based (One exchange server for the enterprise)(Name: exch) Two Domain Controllers (Names: blibble and bdc-blibble) Child Domain: nl.name.com (Windows 2000 based) Uses the exchange server in the name.com domain. Had one domain controller when we ran "setup /domainprep" Now has another domain controller (Names: blobble and bdc-blobble) We recently added a Win2K DC called (bdc-blobble) to the nl.name.com child domain. Whenever we create user accounts...

Display full menu in Excel
Easy question that defies an easy answer in the bloated Microsoft Excel Help. How can I set the default to display the full drop down menus without having to click on the ridiculous arrow button? Thanks. And just to show ya I did look, this is what Help says: "To look for a command that you don't use often or have never used before, click the arrows at the bottom of the menu to show all the commands. You can also double-click the menu to expand it. When you expand one menu, all of the menus are expanded until you choose a command or perform another action. When you click a c...

Mulitple text lines in a single cell
I need to type several sentences into one single cell but I can not for the life of me figure out how to get it to make mulitple text lines in one cell... It looks like this........ and I need it to look like this. Please please help! After typing each line press ALT-ENTER instead of ENTER to go to the next line in the same cell. -- -------- If this is what you wanted then press the ''''YES'''' button (if you see it) "Mrs.Aguire" wrote: > I need to type several sentences into one single cell but I can not for the > life of me figure...

Outlook 2007: Incorrect Tab Spacing When Using Plain Text Format
I am using Outlook 2007 SP2 (Exchange Server). The OS is Windows XP Pro SP2. Whenever I compose a message using the Plain Text format, Outlook 2007 ignores my tab spacing at the moment of printing a copy of my message. I can see the tabbed text correctly on my screen, but when I print a copy of the message the tab spaces are gone; this of course makes reading the message hard to do! (The same problem happens at the recipient's end: They can see the message ok on the screen but not when printing it.) As far as I know, tab spacing should not be a problem in Plain Text mod...

Formula Query #4
I am using a formula to count the number of occurances of an entry - in an ever expanding list of data. The formula that I am using is as follows: =COUNTIF(ActualWeight,">=20")-COUNTIF(ActualWeight,">29") This counts the number of occurances of a weight between 20 and 29 (where ActualWeight is a named range for the data). This formula works absolutely fine and is bringing back a count. I would now like to extend the formula so that it only counts the above if it meets another criteria (a school name) - which has a named range of SchoolName. Does anyone have ...

Sub-query
I have an orders table with several thousand orders. Each order has a Product_Id and a SubProduct_Id. I want to create a query that lists each Product_Id and the number of different SubProduct_Id's associated with it. I can figure out how to do this in 2 queries, but it seems like it should be possible to do it in one. Dear Jim: You can use a subquery. It might look something like this: SELECT P.Product_Id, COUNT(*) AS Ct FROM Products P LEFT JOIN SubProducts S ON S.Product_Id = P.Product_Id FROUP BY P.Product_Id Here are some details about the above: - The LEFT...

i am so confused
As of day before yesterday, i was recieving and sending mail like i should, but now it says my username and/or password are inncorrect, and they are stored in the com, and my phone. i retyped them, and it says the same thing??? i just tried again, and it said the following: The connection to the server has failed. Subject 'hi', Account: 'pop.att.yahoo.com (1)', Server: 'smtp.att.yahoo.com', Protocol: SMTP, Port: 465, Secure(SSL): Yes, Socket Error: 10061, Error Number: 0x800CCC0E Pleas help.... anyone!!!!! i am lost without my e-mail!! Your settings look ...

3d range searching
Hello, I am working with a spreadsheet that has about 50 different worksheets Each worksheet represents a single project, and on it are the list o names of everyone in my office, and the number of hours per week (eac column represents one week) they are working on the project (usuall zero). There is a summary worksheet that sums up how many hours person is working each week. The worksheets are organized so that eac person is represented on the same row in each sheet. For example, Joh Smith's hours for project 1 for the current week are located in cell C for that sheet, and his hours...

placeholder text in publisher
When making a template in publisher, how do I add placeholder text to the text box? I am making templates for my students and want to put placeholder instruction in the text boxes to help them with the content of the box. Do you mean a "call out?" -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "hammerheadtoo" <hammerheadtoo@discussions.microsoft.com> wrote in message news:8BCF22F3-0C9A-4D3D-BF4A-33A19AEF9964@microsoft.com... > When making a template in publisher, how do I add placeholder text to the &...

remove leading spaces from imported text file
Hi, I have an excel sheet with times on it that has come from a tex file, I cannot do sums on the time as the data containing leadin spaces. If I delete these spaces manually then I can do SUMS. Doe anyone know of a way to remove these spaces automaticall ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com "smurf01" <smurf01.wtvbm@excelforum-nospam.com> wrote in message news:smurf01.wtvbm@excelforum-nospam.com... > > Hi, I have an excel sheet with times o...

Converting a text time into a time format.
Hi Here's my problem. I have a text field that is "00:13:45" and i would like to covert that into a time field of "hh:mm:ss" in order to calculate totals/averages. Currently if i change the format of the cell to a hh:mm:ss format it will not change the actual data in the field until you activate(F2) in each cell. I'm familiar with the Timevalue() formula but i would like to avoid adding more columns into the spread sheet Is there a simple way to do this with out having to activate(F2) each of the fields in order for the time to convert. Any one know if i can c...

how to create a subkey with full privileges?
Dear, Folks, I try to create a subkey and I write some strings into registry on my program,I hope my program can run with non- administrator privileges, that means I must create and write into a subkey with restricted user. Can I access the registry on my program when I login with restricted user? Thanks a million Julia Hi Julia! Take a look at CWinApp::SetRegistryKey(). It may do what you need. "Julia" <anonymous@discussions.microsoft.com> a �crit dans le message de news: 0d4001c3d6d1$7e714fd0$a401280a@phx.gbl... > Dear, Folks, > I try to create a subkey and I w...

Link current query to a table?
I'm trying to create a cost estimate form, and I'm working on one underlying query to power it. Its based off a lot number. A certain digit in our lot number indicates the blend of the product. I have a table of blend codes and descriptions based on that digit. I have a column to calculate the blend code from the lot number but I am having no luck getting the description into either the query or the form. I have tried a Dlookup but I seem to have trouble getting it to refer back to the query that it is in. I know I could create another table of Lots and their associ...

Stopping Text Flow
I'm writing a book and can't figure out how to stop to stop text flow at the end of each chapter. When I add something to Chapter 1 it pushes the text forward in Chapter 2 and messes up my formatting. There must be a simple way to do this. Can someone please tell me. Thanks. -Terry PS: I've tried the "disconnect" button but then I don't see anything in Chapter 2 and beyond. Terry from Iowa wrote: > I'm writing a book and can't figure out how to stop to stop text flow at the > end of each chapter. When I add something to Chapter 1 it pushes the text...

Text messaging notifications of email arrival
I am running exchange server 2003 and I have an Outlook client connecting over HTTP to the server. I want to send a notification of some sort to a SMS email address (3373194407@vtext.com) everytime an email hits the client's inbox. I have tried creating a rule in Outlook but could not get it working. Is there a way that I can do this from the exchange server? -- mmeche ...

Text import wizard does import properly beyond text file line 1048
I have attempted again to get the text import feature of MS Excel 2007 to work using a really long (10,402,255 lines) ascii format text data files with two columns of fixed width fields. Despite the updates to the Excel 2007 program since I first tried this, the implementation of this feature remains pitiful. Here are my findings of how this feature of Excel behaves: 1. If you set up the text import to start on the first line of the text source file and put them into your worksheet starting on cell A1, then the importer will capture the first 1048576 lines and put them all into ...

CListCtrl confusion
I am confused about the meaning of selected (LVIS_SELECTED) and focused (LVIS_FOCUSED). What is the difference? The above can be set/read with Set/GetItemState(). The there is also GetSelectionMark() and its set. When you get the selection mark, is this the one that is selected? Or does it mean something else? What I am able to do is click on a row and then execute my method, doit(). Now I want to simply use the up and down arrow keys to move the selection and focus up and down the list, each time calling doit() for the new row. The problem I am running into is that I get recursive calls to...

Need RULE to search for Text in Body with varying # of spaces
Hi there, I have Outlook 2002 and have been using the outlook rule condition: "With specific words in the body" However the "Specific words" I'm looking for might contain varying number of spaces: EX: "some text: some more text" "some text: some more text" Is there a wildcard or something to match multiple spaces? --Thanks very much, Kenneth Kenneth Parker <kenneth.parker@sas.com> wrote: > I have Outlook 2002 and have been using the outlook rule condition: > "With specific words in the body" > > However...

Convert Social Security text to number?
I would like to convert a text social security number (###-##-####) to a numerical format (#########) so that it can search using vlookup functions. Any help is greatly appreciated. -Joe it depends on whether it is numeric formated with the dashes or Text with the dashes embedded. goto <format><cells><number> and select general if the dashes are still there it is text. select the cells and use find replace (Find the dash replace with nothing) the cells will still be text, so enter 1 in a cell copy it select the SSN cells and paste special Multiply "Joe" wro...

Web Query #6
I have this web site which shows the approval status of a number: http://www.mca.gov.in/DCAFODINPortal/dca/MyMCALogin.do?method=setDefaultProperty&mode=22 The sample numbers being checked include the following:- 00004549 00007241 00359036 I have the above numbers in an excel file.I would like to check the approval status of these numbers from excel itself. Can anybody help? : Swami Hi Turn on the macro recorder and do it all once manually, with the first number. Then inspect the code and see where the number figures in the code. After that, you can think of ways to automate the p...

Printing full calendar contents
Sorry, bit of a general user question but any ideas much appreciated. To print all of the details from a particular event, one has to open up (or select) that event. However, does anyone know how to print out all details for ALL events in a particualr week or month? Thanks Ivor ...

Query runs slow.
Hi, I have a query joining few tables. One table is very large (500T rows), but the other tables are having less than 100T records. Query seem to run slow, 1000ms. I have proper indexing implemented. What should i do? I am thinking of few solutions. Fix 1. Make a temp table and apply condition to largest table. Doing so, the temp table will have only 100 records or less and then join Fix 2. Instead of temp table create View for the larger table and apply filter and then join the view with tables Fix 3. implement caching of query (pls suggest if there is any other way to cache the ...

Confused on syntax
Hello, I confused over the following syntax. Could someone please explain to me exactly what is happening here. ((CEditView*)m_viewList.GetHead())->SetWindowText(NULL); I understand the casted type to the m_viewList.GetHead( ) function, but the ->SetWindowText call on the end is what I've never seen done like this? Is somehow the return pointer from GetHead pointing to the SetWindowText function ? But why would this be? Could not SetWindowText just be called on it's own ? On 3 jul, 13:01, "RB" <NoMail@NoSpam> wrote: > Hello, I confused over the following...

Re: "The Disk is full trying to write to c:\..."
Donald C. Calarco wrote: > Message-ID: <f3db3f4349954abe9c28ebf77d89e1e2@newspe.com> > X-Mailer: http://www.umailcampaign.com, ip log:76.16.119.53 > Newsgroups: microsoft.public.publisher > NNTP-Posting-Host: 22.bb.5446.static.theplanet.com 70.84.187.34 > Path: TK2MSFTNGP01.phx.gbl!TK2MSFTNGP02.phx.gbl!newspe.com > Lines: 1 > Xref: TK2MSFTNGP01.phx.gbl microsoft.public.publisher:178074 > > What a ridiculous answwer. JoAnn, the problem is that the file > "won't" save. The problem is not that it wont "open", which is all > you focu...