Java Code Examples for org.elasticsearch.client.Requests#CONTENT_TYPE

The following examples show how to use org.elasticsearch.client.Requests#CONTENT_TYPE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ToXContentToBytes.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
protected ToXContentToBytes() {
    this.defaultType = Requests.CONTENT_TYPE;
}
 
Example 2
Source File: ESTestCase.java    From crate with Apache License 2.0 4 votes vote down vote up
@BeforeClass
public static void setContentType() throws Exception {
    Requests.CONTENT_TYPE = randomFrom(XContentType.values());
    Requests.INDEX_CONTENT_TYPE = randomFrom(XContentType.values());
}
 
Example 3
Source File: ESTestCase.java    From crate with Apache License 2.0 4 votes vote down vote up
@AfterClass
public static void restoreContentType() {
    Requests.CONTENT_TYPE = XContentType.SMILE;
    Requests.INDEX_CONTENT_TYPE = XContentType.JSON;
}