This commit is contained in:
2026-06-15 18:18:16 +08:00
parent 97c9fba14e
commit 2b9f134e5f
4164 changed files with 386922 additions and 79 deletions

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
namespace Best.HTTP.Shared.Databases
{
public abstract class IndexingService<ContentType, MetadataType> where MetadataType : Metadata
{
/// <summary>
/// Index newly added metadata
/// </summary>
public virtual void Index(MetadataType metadata) { }
/// <summary>
/// Remove metadata from all indexes.
/// </summary>
public virtual void Remove(MetadataType metadata) { }
/// <summary>
/// Clear all indexes
/// </summary>
public virtual void Clear() { }
/// <summary>
/// Get indexes in an optimized order. This is usually one of the indexes' WalkHorizontal() call.
/// </summary>
public virtual IEnumerable<int> GetOptimizedIndexes() => null;
}
}