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
tableTableThe Table to search (must have a full-text index).
columnsIEnumerable<Column>The columns to include in the search results.
querystringThe full-text search query string.
Returns
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.