package kr.lunaticbum.back.lun.model


class QCollection {
    var result: QResult? = null
    var status: String? = null
    var time: Double = 0.0
}
class QConfig {
    var params: QParams? = null
    var hnsw_config: QHnswConfig? = null
    var optimizer_config: QOptimizerConfig? = null
    var wal_config: QWalConfig? = null
    var quantization_config: Any? = null
    var strict_mode_config: QStrictModeConfig? = null
}

class QHnswConfig {
    var m: Long = 0
    var ef_construct: Long = 0
    var full_scan_threshold: Int = 0
    var max_indexing_threads: Int = 0
    var on_disk: Boolean = false
}

class QOptimizerConfig {
    var deleted_threshold: Double = 0.0
    var vacuum_min_vector_number: Long = 0
    var default_segment_number: Long = 0
    var max_segment_size: Any? = null
    var memmap_threshold: Any? = null
    var indexing_threshold: Long = 0
    var flush_interval_sec: Long = 0
    var max_optimization_threads: Any? = null
}

class QParams {
    var vectors: QVectors? = null
    var shard_number: Long = 0
    var replication_factor: Long = 0
    var write_consistency_factor: Long = 0
    var on_disk_payload: Boolean = false
}

class QPayloadSchema

class QResult {
    var status: String? = null
    var optimizer_status: String? = null
    var indexed_vectors_count: Long = 0
    var points_count: Long = 0
    var segments_count: Long = 0
    var config: QConfig? = null
    var payload_schema: QPayloadSchema? = null
}



class QStrictModeConfig {
    var enabled: Boolean = false
}

class QVectors {
    var size: Long = 0
    var distance: String? = null
}

class QWalConfig {
    var wal_capacity_mb: Long = 0
    var wal_segments_ahead: Long = 0
}

class QSearchResult {
    var id: Long = 0
    var version: Long = 0
    var score: Double = 0.0
}

class QSearch {
    var result: ArrayList<QSearchResult>? = null
    var status: String? = null
    var time: Double = 0.0
}


// import com.fasterxml.jackson.databind.ObjectMapper; // version 2.11.1
// import com.fasterxml.jackson.annotation.JsonProperty; // version 2.11.1
/* ObjectMapper om = new ObjectMapper();
Root root = om.readValue(myJsonString, Root.class); */
class QContentsPayload {
    var url: String? = null
    var title: String? = null
    var content: String? = null
    var engine: String? = null
    var template: String? = null
    var parsed_url: ArrayList<String>? = null
    var engines: ArrayList<String>? = null
    var positions: ArrayList<Int>? = null
    var score: Double = 0.0
    var category: String? = null
    var originQuery: String? = null
    var pageData: String? = null
}

class QContentsResult {
    var id: Long = 0
    var payload: QContentsPayload? = null
}

class QContents {
    var result: ArrayList<QContentsResult>? = null
    var status: String? = null
    var time: Double = 0.0
}

