Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は Sitecore 6.5 を使用していますが、lucene がデフォルトで検索結果を並べ替える順序を知りたいですか? また、このデフォルトの動作をカスタム ソート ロジックで変更 (置換) できますか?
デフォルトでは、ドキュメントは関連性によってソートされます。任意のフィールドで並べ替えることができます。簡単な例を次に示します (SearchContext 内):
var searchHits = new SearchHits(searchContext.Searcher.Search(query, new Sort("__created", true))); var results = searchHits.FetchResults(0, 100);
「__created」は、ソートするフィールドです。