diff --git a/CHANGELOG.md b/CHANGELOG.md index e9db7cb..de80459 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,15 @@ against 25.7 / 50.0 and 265.0 / 284.4 ms with the gate off. `--keep` leaves the table for `EXPLAIN`. +- **`SearchTrace` on the SQL backends, and a `TraceStage.Gate`.** The PostgreSQL engines now record + the `Score` stage for the page they return — `Postgres lexical`, `Postgres BM25`, `pgvector`, + `sparsevec`, `pg_trgm`, `ParadeDB BM25` — where they previously ignored `SearchOptions.Trace` + entirely. The stock-PostgreSQL BM25 engine also records one query-level `Gate` step naming the + rule that chose its candidate set (the rare terms and their budget, `phrase gate`, or the whole + query) and the candidate count, so a result missing because no gate term matched is + distinguishable from one that scored badly. `SearchTrace.RecordScoreStage` is public for the same + reason: a custom engine outside the core assembly needs to report the stage under the same name. + ### Changed - The shared documents table's upsert and row reader are now one implementation diff --git a/docs/backends.md b/docs/backends.md index 2b344ba..b98ef7d 100644 --- a/docs/backends.md +++ b/docs/backends.md @@ -364,7 +364,9 @@ a document holding none of the gated terms cannot be returned by any score. Two fallbacks keep it honest. When even the rarest term exceeds the budget, the thread falls back to the whole match set, so a corpus of common terms keeps the previous behaviour. And a quoted phrase bypasses the gate entirely: the phrase is the query's contract, and a disjunction of terms must not -stand in for it. `CandidatePool` still bounds how many of the gate's candidates are read (default +stand in for it. The choice is recorded as a `TraceStage.Gate` step — the terms, the budget and the +candidate count — when `SearchOptions.Trace` is set; see +[observability](observability.md#the-candidate-gate-and-the-sql-backends). `CandidatePool` still bounds how many of the gate's candidates are read (default 1,000); with the gate on it rarely binds. **What it buys, in quality.** nDCG@10 over the same corpora, queries and qrels: diff --git a/docs/observability.md b/docs/observability.md index d373aba..6edbff5 100644 --- a/docs/observability.md +++ b/docs/observability.md @@ -27,8 +27,8 @@ allocates and records nothing. `Explain` breaks down one scorer's arithmetic. `SearchTrace` goes further: it records **every stage a document passed through**, so a final rank can be walked back stage by stage — which engine -scored it, what each merger contributed, what the reranker changed, what the boost did, and which -route ran. +scored it, what each merger contributed, what the reranker changed, what the boost did, which +route ran, and — on the PostgreSQL backends — which candidate set the query was scored over. ```csharp using LexiSharp.Core; @@ -72,6 +72,28 @@ allocates **exactly the same bytes** with and without this row (60.1 KB per sear nothing below the `trace is null` guard executes; the traced path allocates **1.4 KB more** (71.0 → 72.4 KB), one step and one string per search against the ten already written per document. +### The candidate gate, and the SQL backends + +The PostgreSQL engines record the same `Score` stage as the in-memory ones, under a name that says +where the score came from — `Postgres lexical`, `Postgres BM25`, `pgvector`, `sparsevec`, `pg_trgm` +or `ParadeDB BM25` — so a hybrid pipeline that mixes a SQL channel with an in-memory one explains +both halves the same way. The page is what is recorded: the stage is bounded by `Limit`, never by +the corpus. + +The stock-PostgreSQL BM25 engine adds one query-level `Gate` row, with an empty document id and +`NaN` scores, before any document row: + +``` +// gate NaN -> NaN rare-term gate [brown, quick] under a 1,000-row budget; 120 candidates +``` + +It names the rule that chose the candidate set — the terms the rare-term gate matched on, or +`all terms (gate disabled)`, `phrase gate`, `all terms (no term within a 1,000-row budget)` — and +how many candidates it produced. That is the one decision on this backend a reader cannot +reconstruct from the page: the score is `Bm25Scorer`'s, but *which* documents were eligible to be +scored is the gate's, and a result that is missing from the page because no rare term matched it is +otherwise indistinguishable from one that scored badly. + **Cost — what is measured and what is not.** Measured with BenchmarkDotNet's `MemoryDiagnoser` and stable across repeated runs: a saturated trace allocates **0 additional bytes** per search (1.34 KB either way), and a trace created per search costs **~0.47 KB** (the object plus its diff --git a/src/LexiSharp.Postgres/ParadeDB/ParadeDBTextSearchEngine.cs b/src/LexiSharp.Postgres/ParadeDB/ParadeDBTextSearchEngine.cs index fb8918e..d48fb2f 100644 --- a/src/LexiSharp.Postgres/ParadeDB/ParadeDBTextSearchEngine.cs +++ b/src/LexiSharp.Postgres/ParadeDB/ParadeDBTextSearchEngine.cs @@ -302,7 +302,9 @@ ORDER BY pdb.score(id) DESC, {PostgresSchema.OrdinalIdTieBreak} results.Add(new SearchResult(document.Id, score, document)); } - return results.Skip(options.Offset).Take(options.Limit).ToList(); + var page = results.Skip(options.Offset).Take(options.Limit).ToList(); + options.Trace?.RecordScoreStage("ParadeDB BM25", page); + return page; } private static bool PassesFilters(SearchOptions options, SearchDocument document) diff --git a/src/LexiSharp.Postgres/PostgresBm25SearchEngine.cs b/src/LexiSharp.Postgres/PostgresBm25SearchEngine.cs index cc13006..058da9b 100644 --- a/src/LexiSharp.Postgres/PostgresBm25SearchEngine.cs +++ b/src/LexiSharp.Postgres/PostgresBm25SearchEngine.cs @@ -1,3 +1,5 @@ +using System.Globalization; + using LexiSharp.Core; using LexiSharp.Ranking; using Npgsql; @@ -248,10 +250,27 @@ public IReadOnlyList Search( var statistics = _statistics ??= PostgresBm25Statistics.Load(connection, _indexOptions); var match = PostgresMatchExpression.Build(_indexOptions, query); - using var command = CreateCandidatesCommand(connection, match, statistics, queryTerms, options); + string[] gateTerms = GateTermsFor(match, statistics, queryTerms); + + using var command = CreateCandidatesCommand(connection, match, gateTerms, options); List candidates = ReadCandidates(command, keptTerms, cancellationToken); + // The gate is a query-level decision, so it is one step with no document id: which rule was + // applied, and how many candidates it produced. Recorded even when the count is zero, + // because "the gate matched nothing" is the answer a reader is looking for. + if (options.Trace is not null) + { + options.Trace.Record(new TraceStep( + TraceStage.Gate, + string.Empty, + double.NaN, + double.NaN, + string.Create( + CultureInfo.InvariantCulture, + $"{GateDescription(match, gateTerms)}; {candidates.Count:N0} candidates"))); + } + if (candidates.Count == 0) return Array.Empty(); @@ -268,7 +287,11 @@ public IReadOnlyList Search( Dictionary documents = ReadDocuments(connection, page, cancellationToken); - return BuildResults(page, documents); + List results = BuildResults(page, documents); + + options.Trace?.RecordScoreStage("Postgres BM25", results); + + return results; } /// @@ -285,8 +308,7 @@ public IReadOnlyList Search( private NpgsqlCommand CreateCandidatesCommand( NpgsqlConnection connection, PostgresMatchExpression match, - PostgresBm25Statistics statistics, - string[] queryTerms, + string[] gateTerms, SearchOptions options) { var command = connection.CreateCommand(); @@ -298,15 +320,9 @@ private NpgsqlCommand CreateCandidatesCommand( // The candidate gate: the query's rare terms when it has any, the whole query otherwise. // A GIN index cannot rank, so this is what keeps the scan proportional to the // discriminative part of the query instead of to every document its common part matches. - // - // Only for a free-text query. A mixed query's gate is the phrase conjunction, and the free - // terms beside it are scoring-only by contract: substituting the rare-term disjunction for - // the phrases would let a document without the phrase in. string gate = match.Gate; - if (_options.RareTermGate - && !match.HasPhrases - && GateTerms(queryTerms, statistics.DocumentFrequency, _options.RareTermGateBudget) is { Length: > 0 } gateTerms) + if (gateTerms.Length > 0) { gate = "tsv @@ (SELECT string_agg(quote_literal(term), ' | ') FROM unnest(@gateTerms::text[]) AS term)::tsquery"; command.Parameters.AddWithValue("gateTerms", gateTerms); @@ -476,6 +492,41 @@ internal static int PoolSize(PostgresBm25Options options, SearchOptions searchOp PostgresBm25Options.MaximumCandidatePool); } + /// + /// The terms the gate applies to this query, or an empty array when it does not apply. + /// + /// + /// Only for a free-text query. A mixed query's gate is the phrase conjunction, and the free + /// terms beside it are scoring-only by contract: substituting the rare-term disjunction for the + /// phrases would let a document without the phrase in. + /// + private string[] GateTermsFor( + PostgresMatchExpression match, PostgresBm25Statistics statistics, string[] queryTerms) => + _options.RareTermGate && !match.HasPhrases + ? GateTerms(queryTerms, statistics.DocumentFrequency, _options.RareTermGateBudget) + : []; + + /// The gate's rule in words, for the trace. + private string GateDescription(PostgresMatchExpression match, string[] gateTerms) + { + if (gateTerms.Length > 0) + { + return string.Create( + CultureInfo.InvariantCulture, + $"rare-term gate [{string.Join(", ", gateTerms)}] under a {_options.RareTermGateBudget:N0}-row budget"); + } + + if (match.HasPhrases) + return "phrase gate"; + + if (!_options.RareTermGate) + return "all terms (gate disabled)"; + + return string.Create( + CultureInfo.InvariantCulture, + $"all terms (no term within a {_options.RareTermGateBudget:N0}-row budget)"); + } + /// /// The query's terms the candidate gate matches on: the rarest ones, by ascending document /// frequency, while their summed document frequency stays inside . diff --git a/src/LexiSharp.Postgres/PostgresFuzzySearchEngine.cs b/src/LexiSharp.Postgres/PostgresFuzzySearchEngine.cs index 789f872..7eee596 100644 --- a/src/LexiSharp.Postgres/PostgresFuzzySearchEngine.cs +++ b/src/LexiSharp.Postgres/PostgresFuzzySearchEngine.cs @@ -300,7 +300,9 @@ public IReadOnlyList Search(string query, SearchOptions? options = results.Add(new SearchResult(document.Id, score, document)); } - return results.Skip(options.Offset).Take(options.Limit).ToList(); + var page = results.Skip(options.Offset).Take(options.Limit).ToList(); + options.Trace?.RecordScoreStage("pg_trgm", page); + return page; } /// Releases the underlying Npgsql data source. diff --git a/src/LexiSharp.Postgres/PostgresSparseSearchEngine.cs b/src/LexiSharp.Postgres/PostgresSparseSearchEngine.cs index be91d79..4502ca8 100644 --- a/src/LexiSharp.Postgres/PostgresSparseSearchEngine.cs +++ b/src/LexiSharp.Postgres/PostgresSparseSearchEngine.cs @@ -365,7 +365,9 @@ WHERE sparse IS NOT NULL{filters.Fragment} } } - return results.Skip(options.Offset).Take(options.Limit).ToList(); + var page = results.Skip(options.Offset).Take(options.Limit).ToList(); + options.Trace?.RecordScoreStage("sparsevec", page); + return page; } /// Releases the underlying Npgsql data source. diff --git a/src/LexiSharp.Postgres/PostgresTextSearchEngine.cs b/src/LexiSharp.Postgres/PostgresTextSearchEngine.cs index cdc65c0..20ee180 100644 --- a/src/LexiSharp.Postgres/PostgresTextSearchEngine.cs +++ b/src/LexiSharp.Postgres/PostgresTextSearchEngine.cs @@ -266,7 +266,9 @@ public IReadOnlyList Search(string query, SearchOptions? options = results.Add(new SearchResult(document.Id, score, document)); } - return results.Skip(options.Offset).Take(options.Limit).ToList(); + var page = results.Skip(options.Offset).Take(options.Limit).ToList(); + options.Trace?.RecordScoreStage("Postgres lexical", page); + return page; } /// Releases the underlying Npgsql data source. diff --git a/src/LexiSharp.Postgres/PostgresVectorSearchEngine.cs b/src/LexiSharp.Postgres/PostgresVectorSearchEngine.cs index 505eeee..ce9fd3e 100644 --- a/src/LexiSharp.Postgres/PostgresVectorSearchEngine.cs +++ b/src/LexiSharp.Postgres/PostgresVectorSearchEngine.cs @@ -987,6 +987,8 @@ private async Task SearchCoreAsync( .Select(x => new SearchResult(x.Key, x.Value, documents[x.Key])) .ToList(); + options.Trace?.RecordScoreStage("pgvector", results); + return new SearchOutcome(results, contributions); } diff --git a/src/LexiSharp/Core/SearchTrace.cs b/src/LexiSharp/Core/SearchTrace.cs index 167a9ab..0a68ba6 100644 --- a/src/LexiSharp/Core/SearchTrace.cs +++ b/src/LexiSharp/Core/SearchTrace.cs @@ -23,6 +23,17 @@ public enum TraceStage /// A router selected a route for the query (per query, not per document). Route = 4, + + /// + /// An engine chose the candidate set a query is scored over (per query, not per document). + /// + /// + /// The detail is the rule the engine applied and what it cost: on the stock-PostgreSQL BM25 + /// engine, the terms a rare-term gate matched on and the candidates it produced, or the whole + /// query when no gate applied. A backend with no candidate choice beyond its index records + /// nothing here. + /// + Gate = 5, } /// @@ -152,9 +163,15 @@ public void Record(in TraceStep step) /// Records the step of a page a scoring engine just ranked. /// Called with the final page rather than per candidate, so the cost is O(page), not O(corpus). /// + /// + /// Public because a backend outside the core assembly (the PostgreSQL engines) and a custom + /// both need to report the same stage under the same name; the + /// alternative was a friend assembly, which would have kept the seam private to this repository's + /// own packages. + /// /// Name of the scorer that produced the scores, used as the step detail. /// The ranked page, best first. - internal void RecordScoreStage(string scorerName, IReadOnlyList page) + public void RecordScoreStage(string scorerName, IReadOnlyList page) { for (int i = 0; i < page.Count; i++) { diff --git a/tests/LexiSharp.Tests/ParadeDBTextSearchEngineTests.cs b/tests/LexiSharp.Tests/ParadeDBTextSearchEngineTests.cs index 004187c..1096c11 100644 --- a/tests/LexiSharp.Tests/ParadeDBTextSearchEngineTests.cs +++ b/tests/LexiSharp.Tests/ParadeDBTextSearchEngineTests.cs @@ -396,4 +396,28 @@ public void Search_WithACancelledToken_Throws() } } -} \ No newline at end of file + [SkippableFact] + public void Search_RecordsTheScoreStage() + { + Skip.If(ConnectionString is null, "POSTGRES_TEST_CONNECTION not set."); + Skip.If(!ParadeDBAvailable(ConnectionString!), "pg_search extension unavailable."); + + using var engine = NewEngine(); + + try + { + engine.Add(new SearchDocument("a", "quick brown fox")); + + var trace = new SearchTrace(); + var results = engine.Search("quick", new SearchOptions(Limit: 10, Trace: trace)); + + Assert.NotEmpty(results); + Assert.Equal(results.Count, trace.Steps.Count(step => step.Stage == TraceStage.Score)); + Assert.All(trace.Steps, step => Assert.Equal("ParadeDB BM25", step.Detail)); + } + finally + { + engine.DropSchema(); + } + } +} diff --git a/tests/LexiSharp.Tests/PostgresBm25SearchEngineTests.cs b/tests/LexiSharp.Tests/PostgresBm25SearchEngineTests.cs index b62e4aa..f4f3dc4 100644 --- a/tests/LexiSharp.Tests/PostgresBm25SearchEngineTests.cs +++ b/tests/LexiSharp.Tests/PostgresBm25SearchEngineTests.cs @@ -547,4 +547,45 @@ public void Constructor_RefusesInvalidRankingParameters() Assert.Throws(() => new PostgresBm25SearchEngine( connection, new PostgresBm25Options { CandidatePool = -1 }, autoCreateSchema: false)); } + + [SkippableFact] + public void Search_RecordsTheGateAndTheScoreStage() + { + Skip.If(ConnectionString is null, "POSTGRES_TEST_CONNECTION not set."); + + Run("trace", engine => + { + engine.Index(Corpus); + + var trace = new SearchTrace(); + var results = engine.Search("quick brown", new SearchOptions(Limit: 10, Trace: trace)); + + TraceStep gate = trace.Steps.Single(step => step.Stage == TraceStage.Gate); + Assert.Equal(string.Empty, gate.DocumentId); + Assert.True(double.IsNaN(gate.Before)); + Assert.Contains("rare-term gate", gate.Detail!, StringComparison.Ordinal); + Assert.Contains("candidates", gate.Detail!, StringComparison.Ordinal); + + var scored = trace.Steps.Where(step => step.Stage == TraceStage.Score).ToList(); + Assert.Equal(results.Count, scored.Count); + Assert.All(scored, step => Assert.Equal("Postgres BM25", step.Detail)); + }); + } + + [SkippableFact] + public void Search_RecordsWhyTheGateWasNotApplied() + { + Skip.If(ConnectionString is null, "POSTGRES_TEST_CONNECTION not set."); + + Run("tracenotgate", engine => + { + engine.Index(Corpus); + + var trace = new SearchTrace(); + engine.Search("quick brown", new SearchOptions(Limit: 10, Trace: trace)); + + TraceStep gate = trace.Steps.Single(step => step.Stage == TraceStage.Gate); + Assert.Contains("gate disabled", gate.Detail!, StringComparison.Ordinal); + }, options => options with { RareTermGate = false }); + } } diff --git a/tests/LexiSharp.Tests/PostgresFuzzySearchEngineTests.cs b/tests/LexiSharp.Tests/PostgresFuzzySearchEngineTests.cs index e7b186b..f258f57 100644 --- a/tests/LexiSharp.Tests/PostgresFuzzySearchEngineTests.cs +++ b/tests/LexiSharp.Tests/PostgresFuzzySearchEngineTests.cs @@ -313,4 +313,19 @@ public void Search_WithACancelledToken_Throws() }); } -} \ No newline at end of file + [SkippableFact] + public void Search_RecordsTheScoreStage() + { + Run(engine => + { + engine.Add(Doc("a", "classic rock")); + + var trace = new SearchTrace(); + var results = engine.Search("classic", new SearchOptions(Limit: 10, Trace: trace)); + + Assert.NotEmpty(results); + Assert.Equal(results.Count, trace.Steps.Count(step => step.Stage == TraceStage.Score)); + Assert.All(trace.Steps, step => Assert.Equal("pg_trgm", step.Detail)); + }); + } +} diff --git a/tests/LexiSharp.Tests/PostgresSparseSearchEngineTests.cs b/tests/LexiSharp.Tests/PostgresSparseSearchEngineTests.cs index addbf6a..3a0df2f 100644 --- a/tests/LexiSharp.Tests/PostgresSparseSearchEngineTests.cs +++ b/tests/LexiSharp.Tests/PostgresSparseSearchEngineTests.cs @@ -346,4 +346,23 @@ public void Search_FiltersGateResults() Filters: new[] { new MetadataFilter("kind", MetadataFilterOperator.Equal, "nope") }))); }); } -} \ No newline at end of file + + [SkippableFact] + public void Search_RecordsTheScoreStage() + { + Skip.If(ConnectionString is null, "POSTGRES_TEST_CONNECTION not set."); + Skip.If(!VectorExtensionAvailable(), "vector extension unavailable."); + + Run(engine => + { + engine.Add(Doc("red", "red apple")); + + var trace = new SearchTrace(); + var results = engine.Search("red apple", new SearchOptions(Limit: 10, Trace: trace)); + + Assert.NotEmpty(results); + Assert.Equal(results.Count, trace.Steps.Count(step => step.Stage == TraceStage.Score)); + Assert.All(trace.Steps, step => Assert.Equal("sparsevec", step.Detail)); + }); + } +} diff --git a/tests/LexiSharp.Tests/PostgresTextSearchEngineTests.cs b/tests/LexiSharp.Tests/PostgresTextSearchEngineTests.cs index c0c2e92..df2ab19 100644 --- a/tests/LexiSharp.Tests/PostgresTextSearchEngineTests.cs +++ b/tests/LexiSharp.Tests/PostgresTextSearchEngineTests.cs @@ -335,4 +335,21 @@ public void Search_WithACancelledToken_Throws() }); } -} \ No newline at end of file + [SkippableFact] + public void Search_RecordsTheScoreStage() + { + Skip.If(ConnectionString is null, "POSTGRES_TEST_CONNECTION not set."); + + Run(engine => + { + engine.Add(new SearchDocument("a", "quick brown fox")); + + var trace = new SearchTrace(); + var results = engine.Search("quick", new SearchOptions(Limit: 10, Trace: trace)); + + Assert.NotEmpty(results); + Assert.Equal(results.Count, trace.Steps.Count(step => step.Stage == TraceStage.Score)); + Assert.All(trace.Steps, step => Assert.Equal("Postgres lexical", step.Detail)); + }); + } +} diff --git a/tests/LexiSharp.Tests/PostgresVectorSearchEngineTests.cs b/tests/LexiSharp.Tests/PostgresVectorSearchEngineTests.cs index b2f389d..82d91c3 100644 --- a/tests/LexiSharp.Tests/PostgresVectorSearchEngineTests.cs +++ b/tests/LexiSharp.Tests/PostgresVectorSearchEngineTests.cs @@ -1119,4 +1119,22 @@ public void Search_FiltersGateResults() Filters: new[] { new MetadataFilter("kind", MetadataFilterOperator.Equal, "nope") }))); }); } -} \ No newline at end of file + + [SkippableFact] + public void Search_RecordsTheScoreStage() + { + Skip.If(ConnectionString is null, "POSTGRES_TEST_CONNECTION not set."); + + Run(engine => + { + engine.Add(Doc("red", "red apple")); + + var trace = new SearchTrace(); + var results = engine.Search("red apple", new SearchOptions(Limit: 10, Trace: trace)); + + Assert.NotEmpty(results); + Assert.Equal(results.Count, trace.Steps.Count(step => step.Stage == TraceStage.Score)); + Assert.All(trace.Steps, step => Assert.Equal("pgvector", step.Detail)); + }); + } +} diff --git a/tests/LexiSharp.Tests/PublicApiBaseline.txt b/tests/LexiSharp.Tests/PublicApiBaseline.txt index ddaad34..7ef424d 100644 --- a/tests/LexiSharp.Tests/PublicApiBaseline.txt +++ b/tests/LexiSharp.Tests/PublicApiBaseline.txt @@ -352,6 +352,7 @@ F|LexiSharp.Core.SearchTrace|DefaultCapacity|System.Int32|static|256 F|LexiSharp.Core.TextFields|Default|System.String|static| F|LexiSharp.Core.TextFields|PositionGap|System.Int32|static|2 F|LexiSharp.Core.TraceStage|Boost|LexiSharp.Core.TraceStage|static|3 +F|LexiSharp.Core.TraceStage|Gate|LexiSharp.Core.TraceStage|static|5 F|LexiSharp.Core.TraceStage|Merge|LexiSharp.Core.TraceStage|static|1 F|LexiSharp.Core.TraceStage|Rerank|LexiSharp.Core.TraceStage|static|2 F|LexiSharp.Core.TraceStage|Route|LexiSharp.Core.TraceStage|static|4 @@ -1220,6 +1221,7 @@ M|LexiSharp.Core.SearchRoute|System.String ToString() M|LexiSharp.Core.SearchRoute|Void Deconstruct(System.String ByRef, LexiSharp.Core.ITextSearchEngine ByRef, System.Collections.Generic.IReadOnlyList`1[LexiSharp.Core.MetadataFilter] ByRef) M|LexiSharp.Core.SearchTrace|System.Collections.Generic.IReadOnlyDictionary`2[LexiSharp.Core.TraceStage,System.Int32] StageCounts() M|LexiSharp.Core.SearchTrace|Void Record(LexiSharp.Core.TraceStep ByRef) +M|LexiSharp.Core.SearchTrace|Void RecordScoreStage(System.String, System.Collections.Generic.IReadOnlyList`1[LexiSharp.Core.SearchResult]) M|LexiSharp.Core.SparseEmbeddingProviderExtensions|System.Threading.Tasks.Task`1[System.Collections.Generic.IReadOnlyDictionary`2[System.String,System.Single]] GetSparseEmbeddingAsync(LexiSharp.Core.ISparseEmbeddingProvider, System.String, System.Threading.CancellationToken) M|LexiSharp.Core.StageRetrievalMetrics|Boolean Equals(LexiSharp.Core.StageRetrievalMetrics) M|LexiSharp.Core.StageRetrievalMetrics|Boolean Equals(System.Object)