Sitecore ベースの Web サイトの検索サイトをプログラミングしています。ここまで来ることができました。
var query = SearchContext.GetQueryable<MySearchResultItem>().Where(i =>
i.ItemContent.Contains(this._View.SearchTerm)).ToArray();
MySearchResultsItem は次のように定義されています。
public class MySearchResultItem
{
// Will match the _name field in the index
[IndexField("_name")]
public string Name
{
get;
set;
}
[IndexField(Sitecore.ContentSearch.BuiltinFields.Content)]
public string ItemContent
{
get;
set;
}
}
で検索すると
[IndexField("_name")]
、私は正しい結果を得ています。でも、全項目の項目を検索したいのですが、 で可能だと思います
[IndexField(Sitecore.ContentSearch.BuiltinFields.Content)]
。
私は何を間違っていますか?すべてのコンテンツをクエリするには、どの IndexField を使用すればよいですか?
ありがとう