FREETEXT Predicate
Note
Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8. Instead, use Windows Search for client side search and Microsoft Search Server Express for server side search.
The FREETEXT predicate performs a best match of the specified words and phrases by finding rows in which the terms and phrases match the meaning, rather than the exact wording of the query. This predicate is an optional part of the optional WHERE clause of the SELECT statement.
SELECT Select_List | *
FROM_Clause
[WHERE FREETEXT([ Column_Reference,] 'Free_Text_String')
[ Boolean_Operator FREETEXT(</b>[<i>Column_Reference,] 'Free_Text_String') ]
... ]
[ORDER_BY_Clause]
Parameters
-
Select_List
-
Specifies the list of column aliases (properties) making up the table (rowset) that is returned as a result of the query.
-
* (asterisk)
-
Specifies all columns. This option is valid only when the FROM_Clause parameter references a predefined view or a temporary view.
-
FROM_Clause
-
Specifies the files on which to perform the search. For details about this parameter, see FROM Clause.
-
Column_Reference
-
Specifies the column name (alias). Its data type must be compatible with the format of the Free_Text_String parameter specified.
-
Free_Text_String
-
Specifies the literal of type Basic String from which to match the meaning.
-
Boolean_Operator
-
Specifies the Boolean operator to use, following the precedence rules previously stated, that combines the FREETEXT predicates.
-
ORDER_BY_Clause
-
Specifies the ordering of the resulting rowset. This clause is optional. For details about this parameter, see ORDER BY Clause.
Remarks
Index Server 1.x and 2.0 required a > 0 comparison operation at the end of the FREETEXT predicate; for example, FREETEXT( … ) >0. Beginning with Indexing Service 3.0, the comparison operation is neither required nor recommended, but is supported for backward compatibility.
A FREETEXT query ignores Boolean, proximity, and wildcard operators.
Note
It is not valid to place NOT before a FREETEXT predicate that begins with a WHERE clause.
Examples
The following example returns files in which the Contents property mentions Microsoft Excel, printing worksheets, and pasting worksheets.
... WHERE FREETEXT('how do I print in Microsoft Excel')
OR FREETEXT('how can I paste a worksheet into another file')
Related topics