M-Files API 23.11.13135.0
SetAnyFieldExpression Method
Expression Object : SetAnyFieldExpression Method
Description
Set the AnyField expression.
Syntax
Visual Basic
Public Sub SetAnyFieldExpression( _
   ByVal FullTextSearchFlags As MFFullTextSearchFlags _
) 
Parameters
FullTextSearchFlags
ValueDescription
MFFullTextSearchFlagsLookInFileDataLooks for matches in the file data of objects.
MFFullTextSearchFlagsLookInMetaDataLooks for matches in the metadata (properties) of objects.
MFFullTextSearchFlagsNoneNone (indicates a basic Boolean search).
MFFullTextSearchFlagsStemmingEnables stemming for all words in the search request. This includes inflected forms of the searched word.
MFFullTextSearchFlagsTypeAllWordsFinds all of the words in the search request.
MFFullTextSearchFlagsTypeAnyWordsFinds any of the words in the search request.
Remarks

Use this method to define an expression for a full text search. The expression contains flags for the full text search, and the SearchCondition object encapsulating the expression contains the searched text as a TypedValue object. The TypedValue needs to be MFDatatypeText.

When using a full-text search, the ConditionType in the parent SearchCondition object needs to be MFConditionTypeContains.

You can combine multiple search flags with a bitwise-OR operator.

When using the Smart Search index, either the MFFullTextSearchFlagsTypeAllWords or MFFullTextSearchFlagsTypeAnyWords flag needs to be present in the expression, e.g.:

Full Text search using Smart Search index
Copy Code
conditionText.Expression.SetAnyFieldExpression
(
    MFFullTextSearchFlags.MFFullTextSearchFlagsLookInFileData
    | MFFullTextSearchFlags.MFFullTextSearchFlagsLookInMetaData
    | MFFullTextSearchFlags.MFFullTextSearchFlagsTypeAllWords
);
See Also

Expression Object  | Expression Members