
org.codelibs.elasticsearch.df.util.RequestUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of elasticsearch-dataformat Show documentation
Show all versions of elasticsearch-dataformat Show documentation
This plugin provides several response formats.
package org.codelibs.elasticsearch.df.util;
import static org.elasticsearch.common.unit.TimeValue.parseTimeValue;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.rest.RestRequest;
public class RequestUtil {
private static final TimeValue DEFAULT_SCROLL = new TimeValue(60000);
private RequestUtil() {
}
public static TimeValue getScroll(final RestRequest request) {
final String scroll = request.param("scroll");
if (scroll != null) {
return parseTimeValue(scroll, DEFAULT_SCROLL, "");
} else {
return DEFAULT_SCROLL;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy