Skip to content

Commit a1526f8

Browse files
moved _doc_count field from rollup._doc_count to root of document (#439) (#442)
Signed-off-by: Petar Dzepina <petar.dzepina@gmail.com> (cherry picked from commit 1f581dd) Co-authored-by: Petar Dzepina <petar.dzepina@gmail.com>
1 parent 6f70ad2 commit a1526f8

File tree

1 file changed

+4
-1
lines changed
  • src/main/kotlin/org/opensearch/indexmanagement/rollup/model

1 file changed

+4
-1
lines changed

src/main/kotlin/org/opensearch/indexmanagement/rollup/model/Rollup.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,10 @@ data class Rollup(
241241
const val MINIMUM_PAGE_SIZE = 1
242242
const val MAXIMUM_PAGE_SIZE = 10_000
243243
const val ROLLUP_DOC_ID_FIELD = "$ROLLUP_TYPE.$_ID"
244-
const val ROLLUP_DOC_COUNT_FIELD = "$ROLLUP_TYPE._doc_count"
244+
/*
245+
* _doc_count has to be in root of document so that core's aggregator would pick it up and use it
246+
* */
247+
const val ROLLUP_DOC_COUNT_FIELD = "_doc_count"
245248
const val ROLLUP_DOC_SCHEMA_VERSION_FIELD = "$ROLLUP_TYPE._$SCHEMA_VERSION_FIELD"
246249
const val USER_FIELD = "user"
247250

0 commit comments

Comments
 (0)