INNER CODE UNIT · Swift

removeItem

ZachNagengast/similarity-search-kit · Sources/SimilaritySearchKit/Core/Index/SimilarityIndex.swift:306

    func removeItem(id: String) {
        indexItems.removeAll { $0.id == id }
    }

    func removeAll() {
        indexItems.removeAll()
    }
}

// MARK: - Persistence

@available(macOS 13.0, iOS 16.0, *)
public extension SimilarityIndex {
    func saveIndex(toDirectory path: URL? = nil, name: String? = nil) throws -> URL {
        let indexName = name ?? self.indexName
        let basePath: URL

        if let specifiedPath = path {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…