Table Configuration

The table configurations are listed below:

ConfigurationsDescriptionOptionsUpdated
number_of_shardsNumber of shardsGreater than 1, defaults to 0No
number_of_replicasNumber of replicas[1, 5], defaults to 1Yes
create_dateTable creation dateNo
data_centerCross-datacenter related configurations. Represents primary data centerDefaults to “DEFAULT”Yes
disaster_preparednessCross-datacenter related configurations. Represents if high availability across data centers is enabledTrue/False, defaults to falseYes
scatter_replicaCross-datacenter related configurations. Generally, at least 1 replica will be allocated to each data center. When set to true, replicas will be allocated to all data centers as much as possible. If there are 5 replicas and 3 data centers, 1 center will have 1 replica, and the others will have 2 for each of them. When set to false, replicas will be allocated mainly to primary data center. Thus if there are 5 replicas and 3 data centers, primary data center will have 3 replicas, and other two centers will have one for eachTrue/False, defaults to falseYes
dc_affinityCross-datacenter related configurations. When set to True, Hippo will try to migrate the leadership of replicas into primary data centerTrue/False, defaults to falseYes
tagTagYes
embedding.segment.max_size_mbExpected size of each index segmentDefaults to 512 MBYes
embedding.segment.seal_proportionWhen the size of Flat index in the memory exceeds a certain percentage of the value set in “embedding.segment.max_size_mb”, Hippo will generate vector index automatically for incremental data. This parameter is used for configuring this percentageDefaults to 0.2Yes
embedding.segment.max_deletion_proportionWhen the volume of data deleted in index segments exceeds a certain percentage, Hippo will automatically compact vector index segments to release available resources. This parameter is used for configuring this percentageDefaults to 0.1Yes

Table 12 Table Configurations


Check Table Configuration

Users can use the following commands to check the table configuration.

curl -u shiva:shiva -XGET 'localhost:8902/hippo/v1/_settings?database_name={database_name}&pretty'
curl -u shiva:shiva -XGET 'localhost:8902/hippo/v1/{table}/_settings?database_name={database_name}&pretty'
curl -u shiva:shiva -XGET 'localhost:8902/hippo/v1/{table}/_setting?database_name={database_name}&pretty'

Result:

{
  "default#book" : {
    "number_of_shards" : 1,
    "creation_date" : "2023-06-15 11:42:25",
    "number_of_replicas" : 1,
    "data_center" : "DEFAULT",
    "dc_affinity" : false,
    "disaster_preparedness" : false,
    "scatter_replica" : false
  }
}

Parameter description:

ParametersDescriptionRequired
tableTable to be matched, supports using asterisk (*) wildcard character and specifying multiple pattens, which are separated by comma (,)No, defaults to *, gets all table information of current database
database_nameThe database where the table is locatedNo, defaults to "default" database
Table 13 Check Table Configuration

Update Table Configuration

Users can use the following commands to update table configuration.

curl -u shiva:shiva -XPUT 'localhost:8902/hippo/v1/{table}/_settings?database_name={database_name}&pretty' -H 'Content-Type: application/json' -d'{
  "number_of_replicas" : 1,
  "data_center" : "beijing",
  "disaster_preparedness" : true,
  "scatter_replica" : true,
  "dc_affinity" : true,
  "tag" : "newTag",
  "tag.clear" : true,
  "embedding.segment.max_size_mb" : 512,
  "embedding.segment.seal_proportion" : 0.2,
  "embedding.segment.max_deletion_proportion" : 0.1
}';

Result:

{
  "acknowledged" : true
}

Parameter description:

ParametersDescriptionRequired
tableTable to be matched, supports using asterisk (*) wildcard character and specifying multiple pattens, which are separated by comma (,)Yes
database_nameThe database where the table is locatedNo, defaults to "default" database
Table 14 Update Table Configuration