In-place columns for hot counters and flags
/ Schema, / Update, / PerformanceIn-place columns for hot counters and flags #
Fields that change constantly — view counters, stock levels, feature
flags, ranking scores — used to pay a full document rebuild on every
partial update. Marking a numeric or boolean field with
"inplace": true gives it a dedicated typed column instead:
PUT /my-collection
{
"properties": {
"title": { "type": "keyword" },
"views": { "type": "integer", "inplace": true },
"score": { "type": "double", "inplace": true },
"active": { "type": "boolean", "inplace": true }
}
}
Partial updates on such fields become O(1) column writes — no fetch, merge, and re-index of the document. Atomic-style operators work directly against the column:
...