Views:

Question:
How can you perform a Fulltext search using the .NET API?

Answer: 
To perform a Fulltext search using the .NET API, you need to use the database name of the Full-text field from a search dialog. To find the database name of a field, please refer to the following article: KBA-36531

The database name is DocuWareFulltext. When setting up the query, this will need to be referenced. 
The following would be an example, 

public static DocumentsQueryResult RunQuery(Dialog dialog)
        {
            var q = new DialogExpression()
            {
                Operation = DialogExpressionOperation.And,
                Condition = new List<DialogExpressionCondition>()
                {
                    DialogExpressionCondition.Create("DocuWareFulltext", "Flying Tom" )
                },
                Count = 100,
                SortOrder = new List<SortedField> 
                { 
                    SortedField.Create("DWSTOREDATETIME", SortDirection.Desc)
                }
            };

            var queryResult = dialog.GetDocumentsResult(q);
            foreach (var d in queryResult.Items)
            {
                Console.WriteLine("Hit {0}: \"{1}\" on {2}", d.Id, (d["SENDER"].Item as string) ?? "-", d.CreatedAt);
            }
            return queryResult;
        }

More on this example and others can be found here: Developers Page

KBA is applicable for both On-premise and Cloud Organizations.

Comments (0)