Corrected Search command

--HG--
branch : dev
This commit is contained in:
Sebastien Ros 2010-07-07 15:02:45 -07:00
parent ef02c6d66d
commit b13c42557a
2 changed files with 3 additions and 2 deletions

View File

@ -15,3 +15,4 @@ glob:profiling
glob:src/*.ReSharper
glob:*.orig
glob:*.suo
glob:*.itrace.csdef

View File

@ -83,8 +83,8 @@ namespace Orchard.Indexing.Commands {
Context.Output.WriteLine("│ {0} │ {1,6} │", "Title" + new string(' ', 60 - "Title".Length), "Score");
Context.Output.WriteLine("├──────────────────────────────────────────────────────────────┼────────┤");
foreach ( var searchHit in results ) {
var title = searchHit.GetString("title");
title = title.Substring(0, Math.Min(60, title.Length)) ?? "- no title -";
var title = searchHit.GetString("title") ?? "- no title -";
title = title.Substring(0, Math.Min(60, title.Length));
var score = searchHit.Score;
Context.Output.WriteLine("│ {0} │ {1,6} │", title + new string(' ', 60 - title.Length), score);
}