@@ -62,8 +62,12 @@ public DateFacetBuilder(final String name) {
6262 }
6363
6464 /**
65- * The field name to perform the histogram facet. Translates to perform the histogram facet
66- * using the provided field as both the {@link #keyField(String)} and {@link #valueField(String)}.
65+ * The field name to use in order to control where the hit will "fall into" within the histogram
66+ * entries -- synonym for keyField(). Essentially, using the key field numeric value, the hit
67+ * will be "rounded" into the relevant bucket controlled by the interval.
68+ *
69+ * @param field
70+ * @return the builder
6771 */
6872 public DateFacetBuilder field (final String field ) {
6973 this .keyFieldName = field ;
@@ -72,8 +76,11 @@ public DateFacetBuilder field(final String field) {
7276
7377 /**
7478 * The field name to use in order to control where the hit will "fall into" within the histogram
75- * entries. Essentially, using the key field numeric value, the hit will be "rounded" into the relevant
76- * bucket controlled by the interval.
79+ * entries -- synonym for field(). Essentially, using the key field numeric value, the hit
80+ * will be "rounded" into the relevant bucket controlled by the interval.
81+ *
82+ * @param keyField
83+ * @return the builder
7784 */
7885 public DateFacetBuilder keyField (final String keyField ) {
7986 this .keyFieldName = keyField ;
@@ -83,6 +90,9 @@ public DateFacetBuilder keyField(final String keyField) {
8390 /**
8491 * The field name to use as the value of the hit to compute data based on values within the interval
8592 * (for example, total).
93+ *
94+ * @param valueField
95+ * @return the builder
8696 */
8797 public DateFacetBuilder valueField (final String valueField ) {
8898 this .valueFieldName = valueField ;
@@ -91,25 +101,44 @@ public DateFacetBuilder valueField(final String valueField) {
91101
92102 /**
93103 * The field name to count distinct values of.
104+ *
105+ * @param distinctField
106+ * @return the builder
94107 */
95108 public DateFacetBuilder distinctField (final String distinctField ) {
96109 this .distinctFieldName = distinctField ;
97110 return this ;
98111 }
99112
100113 /**
101- * The field name to slice the _output by.
114+ * The field name to slice the output by.
115+ *
116+ * @param sliceField
117+ * @return the builder
102118 */
103119 public DateFacetBuilder sliceField (final String sliceField ) {
104120 this .sliceFieldName = sliceField ;
105121 return this ;
106122 }
107123
124+ /**
125+ * A value script to apply -- NOT YET IMPLEMENTED.
126+ *
127+ * @param valueScript
128+ * @return the builder
129+ */
108130 public DateFacetBuilder valueScript (final String valueScript ) {
109131 this .valueScript = valueScript ;
110132 return this ;
111133 }
112134
135+ /**
136+ * Arbitrary additional parameters -- currently none are used.
137+ *
138+ * @param name the parameter name
139+ * @param value the parameter value
140+ * @return the builder
141+ */
113142 public DateFacetBuilder param (final String name , final Object value ) {
114143 if (params == null ) {
115144 params = Maps .newHashMap ();
@@ -119,7 +148,10 @@ public DateFacetBuilder param(final String name, final Object value) {
119148 }
120149
121150 /**
122- * The language of the value script.
151+ * The language of the value script -- NOT YET IMPLEMENTED.
152+ *
153+ * @param lang the language
154+ * @return the builder
123155 */
124156 public DateFacetBuilder lang (final String lang ) {
125157 this .lang = lang ;
@@ -129,6 +161,9 @@ public DateFacetBuilder lang(final String lang) {
129161 /**
130162 * The interval used to control the bucket "size" where each key value of a hit will fall into. Check
131163 * the docs for all available values.
164+ *
165+ * @param interval the interval setting
166+ * @return the builder
132167 */
133168 public DateFacetBuilder interval (final String interval ) {
134169 this .interval = interval ;
@@ -137,6 +172,9 @@ public DateFacetBuilder interval(final String interval) {
137172
138173 /**
139174 * Should pre zone be adjusted for large (day and above) intervals. Defaults to <tt>false</tt>.
175+ *
176+ * @param preZoneAdjustLargeInterval true/false
177+ * @return the builder
140178 */
141179 public DateFacetBuilder preZoneAdjustLargeInterval (final boolean preZoneAdjustLargeInterval ) {
142180 this .preZoneAdjustLargeInterval = preZoneAdjustLargeInterval ;
@@ -149,6 +187,9 @@ public DateFacetBuilder preZoneAdjustLargeInterval(final boolean preZoneAdjustLa
149187 * <p/>
150188 * Can either be in the form of "-10:00" or
151189 * one of the values listed here: http://joda-time.sourceforge.net/timezones.html.
190+ *
191+ * @param preZone a timezone string
192+ * @return the builder
152193 */
153194 public DateFacetBuilder preZone (final String preZone ) {
154195 this .preZone = preZone ;
@@ -161,6 +202,9 @@ public DateFacetBuilder preZone(final String preZone) {
161202 * <p/>
162203 * Can either be in the form of "-10:00" or
163204 * one of the values listed here: http://joda-time.sourceforge.net/timezones.html.
205+ *
206+ * @param postZone a timezone string
207+ * @return the builder
164208 */
165209 public DateFacetBuilder postZone (final String postZone ) {
166210 this .postZone = postZone ;
@@ -169,6 +213,9 @@ public DateFacetBuilder postZone(final String postZone) {
169213
170214 /**
171215 * Sets a pre offset that will be applied before rounding the results.
216+ *
217+ * @param preOffset a valid time value
218+ * @return the builder
172219 */
173220 public DateFacetBuilder preOffset (final TimeValue preOffset ) {
174221 this .preOffset = preOffset .millis ();
@@ -177,6 +224,9 @@ public DateFacetBuilder preOffset(final TimeValue preOffset) {
177224
178225 /**
179226 * Sets a post offset that will be applied after rounding the results.
227+ *
228+ * @param postOffset a valid time value
229+ * @return the builder
180230 */
181231 public DateFacetBuilder postOffset (final TimeValue postOffset ) {
182232 this .postOffset = postOffset .millis ();
@@ -186,6 +236,9 @@ public DateFacetBuilder postOffset(final TimeValue postOffset) {
186236 /**
187237 * Sets the factor that will be used to multiply the value with before and divided
188238 * by after the rounding of the results.
239+ *
240+ * @param factor the rounding factor
241+ * @return the builder
189242 */
190243 public DateFacetBuilder factor (final float factor ) {
191244 this .factor = factor ;
@@ -195,6 +248,9 @@ public DateFacetBuilder factor(final float factor) {
195248 /**
196249 * How many distinct terms can we collect in each result bucket before
197250 * flipping over to approximate counting? (Distinct mode only)
251+ *
252+ * @param threshold the threshold
253+ * @return the builder
198254 */
199255 public DateFacetBuilder exactThreshold (final int threshold ) {
200256 this .exactThreshold = threshold ;
@@ -204,6 +260,9 @@ public DateFacetBuilder exactThreshold(final int threshold) {
204260 /**
205261 * Should the facet run in global mode (not bounded by the search query) or not (bounded by
206262 * the search query). Defaults to <tt>false</tt>.
263+ *
264+ * @param global true/false
265+ * @return the builder
207266 */
208267 @ Override
209268 public DateFacetBuilder global (final boolean global ) {
@@ -213,6 +272,9 @@ public DateFacetBuilder global(final boolean global) {
213272
214273 /**
215274 * An additional filter used to further filter down the set of documents the facet will run on.
275+ *
276+ * @param the filter to use
277+ * @return the builder
216278 */
217279 @ Override
218280 public DateFacetBuilder facetFilter (final FilterBuilder filter ) {
@@ -223,6 +285,9 @@ public DateFacetBuilder facetFilter(final FilterBuilder filter) {
223285 /**
224286 * Sets the nested path the facet will execute on. A match (root object) will then cause all the
225287 * nested objects matching the path to be computed into the facet.
288+ *
289+ * @param nested a nested path using dot notation
290+ * @return the builder
226291 */
227292 @ Override
228293 public DateFacetBuilder nested (final String nested ) {
0 commit comments