Skip to content

Commit

Permalink
notes
Browse files Browse the repository at this point in the history
  • Loading branch information
Shazwazza committed Sep 26, 2024
1 parent dc0b886 commit fdcf98e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Examine.Lucene/Search/LuceneSearchExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,12 @@ public ISearchResults Execute()

var results = new List<LuceneSearchResult>(topDocs.ScoreDocs.Length);

// Order by Doc Id for improved perf!
// TODO: Order by Doc Id for improved perf??
// Our benchmarks show this is isn't a significant performance improvement,
// but they could be wrong. Sorting by DocId here could only be done if there
// are no sort options.
// See https://cwiki.apache.org/confluence/display/lucene/ImproveSearchingSpeed
foreach (var scoreDoc in topDocs.ScoreDocs/*.OrderBy(x => x.Doc)*/)
foreach (var scoreDoc in topDocs.ScoreDocs)
{
var result = GetSearchResult(scoreDoc, topDocs, searcher.IndexSearcher);
results.Add(result);
Expand Down

0 comments on commit fdcf98e

Please sign in to comment.