【发布时间】:2010-09-30 14:35:04
【问题描述】:
我正在尝试使用 FullTextSqlQuery 类在 SharePoint 2010 中执行搜索:
using (SPSite site = new SPSite("http://localhost"))
{
using (FullTextSqlQuery query = new FullTextSqlQuery(site))
{
query.QueryText = "SELECT Title, FooText FROM scope() WHERE FooText = 'Foo2'";
query.ResultTypes = ResultType.RelevantResults;
//result output here...
}
}
上面使用的 SQL 语句返回一些结果。但是用下面的语句,用'LIKE'替换'=',没有返回结果:
SELECT Title, FooText FROM scope() WHERE FooText LIKE 'Foo2'
注意:FooText 是 Text 类型和单值的托管属性。
【问题讨论】:
标签: c# search full-text-search sharepoint-2010