Table of Contents

Method FullTextRetrieval

Namespace
YndigoBlue.Velocity.Engine
Assembly
YndigoBlue.Velocity.dll

FullTextRetrieval(Table, IEnumerable<Column>, string)

Performs a full-text search on a table and returns all results in a disconnected result set.

public ResultSet FullTextRetrieval(Table table, IEnumerable<Column> columns, string query)

Parameters

table Table

The Table to search (must have a full-text index).

columns IEnumerable<Column>

The columns to include in the search results.

query string

The full-text search query string.

Returns

ResultSet

A ResultSet containing all matching records.

Examples

using (var m = new Manager(conn))
{
    var schema = m.LoadSchema("app");
    var articlesTable = schema["articles"];

    var columns = new[] { articlesTable["title"], articlesTable["content"] };
    var results = m.FullTextRetrieval(articlesTable, columns, "machine learning");

    Console.WriteLine($"Found {results.Count} articles about machine learning");
}

Remarks

The table must have a full-text index created on the columns being searched. All results are loaded into memory, so use FullTextSearch for large result sets.

Exceptions

DbException

Thrown when a database error occurs.