![]() | SphinxQLCommandCommandType Property |
Namespace: SphinxConnector.SphinxQL
using (SphinxQLConnection connection = new SphinxQLConnection(connectionString)) { var command = connection.CreateCommand("KEYWORDS"); command.CommandType = CommandType.StoredProcedure; command.Parameters.Add("My Text"); command.Parameters.Add("My Index"); command.Parameters.Add(1); connection.Open(); SphinxQLDataAdapter dataAdapter = new SphinxQLDataAdapter { SelectCommand = command }; DataTable dt = new DataTable(); dataAdapter.Fill(dt); dataAdapter.Dispose(); } using (SphinxQLConnection connection = new SphinxQLConnection(connectionString)) { var command = connection.CreateCommand("SNIPPETS"); command.CommandType = CommandType.StoredProcedure; command.Parameters.Add("document text"); command.Parameters.Add("sakila"); command.Parameters.Add("text"); command.Parameters.Add(new SphinxQLParameter { Value = "5 AS limit", SphinxType = SphinxType.BigInt }); connection.Open(); SphinxQLDataAdapter dataAdapter = new SphinxQLDataAdapter { SelectCommand = command }; DataTable dt = new DataTable(); dataAdapter.Fill(dt); dataAdapter.Dispose(); }