You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/search-pipeline-common/src/main/java/org/opensearch/search/pipeline/common/TemporalRoutingSearchProcessor.java
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -61,9 +61,13 @@ public class TemporalRoutingSearchProcessor extends AbstractProcessor implements
61
61
* Supported temporal granularities
62
62
*/
63
63
publicenumGranularity {
64
+
/** Hour granularity for hourly bucketing */
64
65
HOUR(ChronoUnit.HOURS),
66
+
/** Day granularity for daily bucketing */
65
67
DAY(ChronoUnit.DAYS),
68
+
/** Week granularity for weekly bucketing (ISO week) */
66
69
WEEK(ChronoUnit.WEEKS),
70
+
/** Month granularity for monthly bucketing */
67
71
MONTH(ChronoUnit.MONTHS);
68
72
69
73
privatefinalChronoUnitchronoUnit;
@@ -72,10 +76,20 @@ public enum Granularity {
72
76
this.chronoUnit = chronoUnit;
73
77
}
74
78
79
+
/**
80
+
* Gets the ChronoUnit associated with this granularity
81
+
* @return the ChronoUnit
82
+
*/
75
83
publicChronoUnitgetChronoUnit() {
76
84
returnchronoUnit;
77
85
}
78
86
87
+
/**
88
+
* Parses a string value to a Granularity enum
89
+
* @param value the string representation of the granularity
90
+
* @return the corresponding Granularity enum value
91
+
* @throws IllegalArgumentException if the value is not valid
0 commit comments