Skip to content

Commit

Permalink
Fix #987 - greatly feed up curated feed search by storing curated fee…
Browse files Browse the repository at this point in the history
…d keys in the Lucene Index and using that for filtering the search results instead of hitting the database and merging lists.
  • Loading branch information
Tim Lovell-Smith committed Apr 26, 2013
1 parent 7b69f5b commit 88d2a3a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Facts/Controllers/CuratedFeedsControllerFacts.cs
Expand Up @@ -210,12 +210,12 @@ public void WillSearchForAPackage()
var mockPackages = new[] { redPill.Packages.ElementAt(0) }.AsQueryable();

controller.StubCuratedFeedService
.Setup(stub => stub.GetPackageRegistrations("TheMatrix"))
.Returns(mockPackageRegistrations);
.Setup(stub => stub.GetKey("TheMatrix"))
.Returns(2);

int totalHits;
controller.StubSearchService
.Setup(stub => stub.Search(It.IsAny<SearchFilter>(), out totalHits, mockPackageRegistrations))
.Setup(stub => stub.Search(It.IsAny<SearchFilter>(), out totalHits))
.Returns(mockPackages);

var mockHttpContext = new Mock<HttpContextBase>();
Expand Down
2 changes: 1 addition & 1 deletion Website/Services/PackageSource.cs
Expand Up @@ -64,4 +64,4 @@ public IQueryable<PackageIndexEntity> GetPackagesForIndexing(DateTime? newerThan
return entities.AsQueryable();
}
}
}
}

0 comments on commit 88d2a3a

Please sign in to comment.