diff --git a/Lib/Portoa.Lucene.dll b/Lib/Portoa.Lucene.dll index 236de4c..e677f15 100644 Binary files a/Lib/Portoa.Lucene.dll and b/Lib/Portoa.Lucene.dll differ diff --git a/Lib/Portoa.Lucene.xml b/Lib/Portoa.Lucene.xml index 3f44473..9c23449 100644 --- a/Lib/Portoa.Lucene.xml +++ b/Lib/Portoa.Lucene.xml @@ -4,37 +4,12 @@ Portoa.Lucene - - - Handles interaction between objects and Lucene documents - - - - - - Builds a out of another object - - The object from which to build the document - - - - Gets a term representing the identifying in a - . This can be used as a means - to delete documents using an , for example. - - The object from which to create the term - - - - implementation for entities based on Lucene.NET - - implementation based on Lucene.NET - + Transforms the results of a search into a proper result set @@ -57,11 +32,10 @@ Gets the index directory associated with this searcher - + - implementation for entities based on Lucene.NET + implementation for entities based on Lucene.NET - The entity to build the index for @@ -99,5 +73,31 @@ Application logger + + + implementation for entities based on Lucene.NET + + The entity to build the index for + + + + Handles interaction between objects and Lucene documents + + + + + + Builds a out of another object + + The object from which to build the document + + + + Gets a term representing the identifying in a + . This can be used as a means + to delete documents using an , for example. + + The object from which to create the term + diff --git a/Src/VideoGameQuotes.Web/Configuration/EnableSearchWithLucene.cs b/Src/VideoGameQuotes.Web/Configuration/EnableSearchWithLucene.cs index f5f7dc0..1483afb 100644 --- a/Src/VideoGameQuotes.Web/Configuration/EnableSearchWithLucene.cs +++ b/Src/VideoGameQuotes.Web/Configuration/EnableSearchWithLucene.cs @@ -20,6 +20,7 @@ using Directory = Lucene.Net.Store.Directory; using Version = Lucene.Net.Util.Version; namespace VideoGameQuotes.Web.Configuration { + public class EnableSearchWithLucene : UnityContainerExtension { protected override void Initialize() { var indexWriterLifetimeManager = new ExplicitlyDisposableLifetimeManager( @@ -56,12 +57,7 @@ namespace VideoGameQuotes.Web.Configuration { } private static IndexWriter CreateIndexWriter(IUnityContainer container) { - return new IndexWriter( - container.Resolve(), - new StandardAnalyzer(Version.LUCENE_29), - true, - IndexWriter.MaxFieldLength.UNLIMITED - ); + return new IndexWriter(container.Resolve(), container.Resolve(), true, IndexWriter.MaxFieldLength.UNLIMITED); } #endregion diff --git a/Src/VideoGameQuotes.Web/VideoGameQuotes.Web.csproj b/Src/VideoGameQuotes.Web/VideoGameQuotes.Web.csproj index e073cfb..124f139 100644 --- a/Src/VideoGameQuotes.Web/VideoGameQuotes.Web.csproj +++ b/Src/VideoGameQuotes.Web/VideoGameQuotes.Web.csproj @@ -33,7 +33,9 @@ 4 - + + ..\..\Lib\Lucene.Net.dll + ..\..\Lib\Microsoft.Practices.Unity.dll @@ -49,7 +51,9 @@ ..\..\Lib\Portoa.Log4Net.dll - + + ..\..\Lib\Portoa.Lucene.dll + False ..\..\Lib\Portoa.NHibernate.dll @@ -208,9 +212,7 @@ - - - + {329FAB1F-A18D-4B7B-9E3C-A0C157E55503} diff --git a/Src/VideoGameQuotes.Web/Views/Quote/Search.aspx b/Src/VideoGameQuotes.Web/Views/Quote/Search.aspx index 8f16979..d7506a4 100644 --- a/Src/VideoGameQuotes.Web/Views/Quote/Search.aspx +++ b/Src/VideoGameQuotes.Web/Views/Quote/Search.aspx @@ -6,9 +6,14 @@ Search results for: <%: Model.SearchQuery %>

- <% +<% + if (Model.Results.Any()) { foreach (var result in Model.Results) { Html.RenderPartial("SingleQuote", new QuoteModel { Quote = result.Record, User = Model.User }); } - %> + } else { %> +

+ Nothing turned up. You suck at searching for things and you’re ugly. +

+ <% } %> \ No newline at end of file