Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Lance format Lance Java ZoneMapIndexParams

From Leeroopedia


Knowledge Sources
Domains Java_SDK, Indexing
Last Updated 2026-02-08 19:33 GMT

Overview

Description

ZoneMapIndexParams is a final Java class in the org.lance.index.scalar package that provides a builder-style configuration for ZoneMap scalar index parameters. It constructs a ScalarIndexParams instance with the index type set to "zonemap". A zone map index stores min/max statistics per zone (group of rows) to enable fast range-based predicate pushdown. The builder supports a single optional parameter: rowsPerZone, which controls the approximate number of rows in each zone.

Usage

Use ZoneMapIndexParams.builder() to configure zone map index options. The build() method returns a ScalarIndexParams object. The JSON parameters are always serialized (even if empty), using JsonUtils.toJson().

Code Reference

Source Location

java/src/main/java/org/lance/index/scalar/ZoneMapIndexParams.java

Signature

public final class ZoneMapIndexParams {
    public static Builder builder();

    public static final class Builder {
        public Builder rowsPerZone(long rowsPerZone);
        public ScalarIndexParams build();
    }
}

Import

import org.lance.index.scalar.ZoneMapIndexParams;

I/O Contract

Builder Inputs
Parameter Type Required Default Validation Description
rowsPerZone long No Not set (Rust default) Must be positive Approximate number of rows per zone
Build Output
Return Type Description
ScalarIndexParams A scalar index params object with type "zonemap" and JSON configuration
JSON Parameters (serialized internally)
Key Type Description
rows_per_zone long Approximate number of rows per zone

Usage Examples

import org.lance.index.scalar.ZoneMapIndexParams;
import org.lance.index.scalar.ScalarIndexParams;
import org.lance.index.IndexParams;

// Create a zone map index with default settings
ScalarIndexParams defaultZoneMap = ZoneMapIndexParams.builder().build();

// Create a zone map index with custom rows per zone
ScalarIndexParams customZoneMap = ZoneMapIndexParams.builder()
    .rowsPerZone(8192)
    .build();

// Wrap in IndexParams for use with IndexOptions
IndexParams params = IndexParams.builder()
    .setScalarIndexParams(customZoneMap)
    .build();

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment