2026-10-11 18:26:35 +02:00
|
|
|
namespace AIStudio.Tools.Services;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2026-10-17 19:12:43 +02:00
|
|
|
/// What an indexing run of a data source works for: its embedding settings and the documents it selects.
|
2026-10-11 18:26:35 +02:00
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>
|
2026-10-17 19:12:43 +02:00
|
|
|
/// A run counts as outdated when the next run would throw its work away, or when it works with
|
|
|
|
|
/// documents which no longer belong to the data source, or misses the ones which now do. Both parts
|
|
|
|
|
/// are descriptions which exist anyway, so no list of fields has to be kept in step with them by
|
|
|
|
|
/// hand: the embedding signature decides when a stored index is thrown away, and the selection
|
|
|
|
|
/// signature is what the selection of a folder tells about itself.
|
2026-10-11 18:26:35 +02:00
|
|
|
/// </remarks>
|
|
|
|
|
/// <param name="EmbeddingSignature">The embedding signature of the run, cf. DataSourceEmbeddingService.BuildEmbeddingSignature.</param>
|
2026-10-17 19:12:43 +02:00
|
|
|
/// <param name="SelectionSignature">Which documents the run works with, cf. DataSourceEmbeddingService.BuildSelectionSignature.</param>
|
|
|
|
|
internal sealed record DataSourceRunSignature(string EmbeddingSignature, string SelectionSignature)
|
2026-10-11 18:26:35 +02:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// No run would start: the data source or its embedding provider is gone, or that provider may not read it.
|
|
|
|
|
/// </summary>
|
2026-10-17 19:12:43 +02:00
|
|
|
public static readonly DataSourceRunSignature NONE = new(string.Empty, string.Empty);
|
2026-10-11 18:26:35 +02:00
|
|
|
}
|