SQL Azure的 - 字符串搜索? [英] SQL Azure - Substring Searches?
问题描述
SQL Azure不支持SQL Server的全文搜索功能。
这是否意味着文本字段不能被索引来处理字符串搜索?
SQL Azure does not support SQL Server's Full Text Search feature. Does this mean a text field cannot be indexed to handle substring searches?
例如,如果我有一个表的电子邮件,有消息列
我想找到与两个词'你好',并在他们的感谢的所有邮件,将在信息标准指数型collumn允许我这样做吗?
For example, if I have a table Emails, with a Message column And I want to find all messages with both the words 'hello' and 'thanks' in them, will the standard index on the message collumn allow me to do this?
CREATE TABLE Emails (
[Id] bigint NOT NULL,
[Message] nvarchar({some number}) NOT NULL
);
GO
CREATE NONCLUSTERED INDEX Messages_Emails ON Emails
my query (using entity) would look like
var niceMessageQuery = Context.Emails.Where(e => e.Message.Contains("hello") && e.Message.Contains("thanks"));
有没有建立一个更好的办法这个查询?
Is there a better way to setup this query?
推荐答案
截至4月的2015年全文搜索是在Azure中的SQL数据库服务器版本V12可供选择:<一href=\"http://azure.microsoft.com/blog/2015/04/30/full-text-search-is-now-available-for-$p$pview-in-azure-sql-database/\" rel=\"nofollow\">http://azure.microsoft.com/blog/2015/04/30/full-text-search-is-now-available-for-$p$pview-in-azure-sql-database/.
As of April 2015 Full-Text Search is available in Azure Sql Database server version V12: http://azure.microsoft.com/blog/2015/04/30/full-text-search-is-now-available-for-preview-in-azure-sql-database/.
这篇关于SQL Azure的 - 字符串搜索?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!