Files
Libation/Source/LibationSearchEngine/SearchResults.cs
Michael Bucari-Tovo 3ab1edc076 Code Cleanup
Make fields readonly
Remove unnecessary casts
Format document
Remove unnecessary usings
Sort usings
Use file-level namespaces
Order modifiers
2026-02-05 12:48:44 -07:00

29 lines
629 B
C#

using Lucene.Net.Documents;
using System.Collections.Generic;
namespace LibationSearchEngine;
public class SearchResultSet
{
public string SearchString { get; }
public IEnumerable<ScoreDocExplicit> Docs { get; }
public SearchResultSet(string searchString, IEnumerable<ScoreDocExplicit> docs)
{
SearchString = searchString;
Docs = docs;
}
}
public class ScoreDocExplicit
{
public Document Doc { get; }
public string ProductId { get; }
public float Score { get; }
public ScoreDocExplicit(Document doc, float score)
{
Doc = doc;
ProductId = doc.GetField(SearchEngine._ID_).StringValue;
Score = score;
}
}